Azure / Azure/data-api-builder

[Bug]: No GraphQL operation trace spans

Offen
#3,561 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
2.x telemetry
Vorherrschende Sprache
C#
Sterne
1.5k
Forks
370
Ø Merge
3 T. 22 Std.
Gemergte PRs (30 T.)
9

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, DABs GraphQL-/Hot-Chocolate-Setup und die OpenTelemetry-Konfiguration zu lokalisieren, und untersuche anschließend, wo AddHotChocolateInstrumentation() in die Query-Pipeline passt. Als abgeschlossen gilt die Aufgabe, wenn GraphQL-Operationen Spans mit Operationsmetadaten ausgeben und einfache, verschachtelte und Introspection-Queries in verteilten Traces unterscheiden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, graphql
Bereich
api, observability
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.