Our solution
Four spans, zero instrumentation code
The router automatically generates OpenTelemetry spans for every phase of every request. No custom code, no decorators, no middleware. The spans appear in Cosmo Studio and in any OTEL-compatible backend.
How per-phase tracing works
The router automatically generates OpenTelemetry spans for each phase of every GraphQL request. No custom instrumentation required.
The Authenticate span covers time spent validating against configured authentication providers. It appears only when authentication is enabled.
The Operation - Parse and Validate span covers parsing of variables and query body, and validation against the schema.
The Operation - Planning span covers construction of the optimized query plan, including normalization. The `enginePlanCacheHit` attribute shows whether the plan came from cache.
The Operation - Execution span covers fetching data from subgraphs and aggregating the response. Expand it to see individual subgraph fetch times.
View traces in Cosmo Studio or export to Jaeger, Zipkin, Datadog, Grafana Tempo, or any OTLP-compatible backend.
Automatic. No code changes required.

