Azure / Azure/data-api-builder
[Bug]: No GraphQL operation trace spans
- Lingua principale
- C#
- Stelle
- 1.5k
- Fork
- 370
- Merge medio
- 3g 22h
- PR unite (30g)
- 9
Descrizione
GraphQL queries and mutations produce no dedicated trace spans. Complex operations — including 3-level nested relationship queries (User→Todos→Categories) — are invisible in distributed traces.
## Expected
Each GraphQL operation should produce a span with operation metadata:
```
Span: POST /graphql
Kind: Server
Attributes:
graphql.operation.type = query
graphql.operation.name = (anonymous)
graphql.document = { users { items { Id Name todos { items { id title categories { items { Id Name } } } } } } }
```
Hot Chocolate (DAB's GraphQL engine) supports OTEL instrumentation via `AddHotChocolateInstrumentation()` which emits spans for the query pipeline, parsing, validation, and field resolution.
## Actual
GraphQL requests only appear as HTTP-level logs in `Microsoft.AspNetCore.Hosting.Diagnostics` with `Path: /graphql`. There are no spans capturing the GraphQL operation type, query document, resolver execution, or field-level timing. A 3-level nested query and a simple `{ __schema { types { name } } }` introspection look identical in telemetry.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia individuando la configurazione GraphQL/Hot Chocolate di DAB e la configurazione di OpenTelemetry, quindi esamina dove si inserisce AddHotChocolateInstrumentation() nella pipeline delle query. Il lavoro è completo quando le operazioni GraphQL emettono span con i metadati dell’operazione e distinguono le query semplici, annidate e di introspezione nelle trace distribuite.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp, graphql
- Ambito
- api, observability
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100