Repository navigation
[Website] Document v16 telemetry and subgraph operation name changes - #10386
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved telemetry documentation corrections and Fusion instrumentation clarifications remain.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates the v15-to-v16 migration guides with current telemetry and Fusion subgraph operation-name changes.
Changes:
- Documents renamed and new telemetry spans, attributes, events, and options.
- Documents Fusion operation-name formats and gateway diagnostics.
- Adds cross-references between shared and Fusion-specific guidance.
File summaries
| File | Summary |
|---|---|
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md |
Updates Hot Chocolate telemetry migration documentation. |
website/content/docs/fusion/migration/migrate-from-15-to-16.md |
Documents Fusion operation names and gateway diagnostics. |
Review details
Suppressed comments (4)
website/content/docs/fusion/migration/migrate-from-15-to-16.md:1046
GraphQL Step Executiondoes not always carrygraphql.source_schema.name: the instrumentation sets it only for source operation/batch nodes with a non-empty schema name, while node-field and introspection spans pass no schema name. Please qualify this row so consumers do not assume the attribute exists on every execution-node span.
| `GraphQL Step Execution` | One span per execution node. Carries `graphql.processing.type=step_execute`, `graphql.operation.step.id`, `graphql.operation.step.kind`, `graphql.operation.step.plan.id`, `graphql.source_schema.name`, and, depending on the node, the `graphql.source_schema.operation.*` or `graphql.source_schema.batch.*` attributes. |
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1242
- The
parsevalue is not emitted by the v16 implementation:ParsingSpanintentionally leaves theProcessing.Typeassignment commented out, and there are no other call sites forTypeValues.Parse. Please removeparsefrom this migration list (or document it only after the tag is actually emitted), otherwise readers will build filters for telemetry they cannot receive.
| `graphql.processing.type` | Identifies the stage a span covers: `request`, `parse`, `validate`, `variable_coercion`, `plan`, `execute`, `step_execute`, `resolve`, `dataloader_dispatch`, `dataloader_batch`, or `subscription_event`. |
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1248
- This table omits
graphql.operation.step.kind, even though it is emitted on everyGraphQL Step Executionspan and is listed in the gateway span description above. Add it to the migration table so consumers do not miss this member of thegraphql.operation.step.*family.
| `graphql.operation.step.id` | Gateway only. The ID of the plan step a `GraphQL Step Execution` span covers. |
| `graphql.operation.step.plan.id` | Gateway only. The ID of the operation plan the step belongs to. |
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1251
graphql.source_schema.nameis emitted by the Fusion step span and is already promised in the Fusion guide, but it is missing from the shared attribute table. Add it alongside the othergraphql.source_schema.*entries so the table is complete.
| `graphql.source_schema.operation.name` | Gateway only. The name of the operation sent to the source schema. |
| `graphql.source_schema.operation.hash` | Gateway only. The SHA-256 of the operation document sent to the source schema, prefixed with `sha256:`. |
| `graphql.source_schema.batch.operation_count` | Gateway only. The number of operations in a batched step. |
- Files reviewed: 2/2 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
The guides contain unresolved telemetry and operation-name documentation inaccuracies.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (8)
Previously missed (2) — in code that hasn't changed since the last review.
website/content/docs/fusion/migration/migrate-from-15-to-16.md:979
- This says one request always shares one short hash across all steps, but incremental plans created by
@deferexplicitly use the literaldeferinstead of the request hash (as the next bullet notes). Qualify this sentence to make the exception unambiguous.
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1242 graphql.processing.type=parseis listed as an emitted value, but theParsingSpanimplementation leaves the assignment commented out, so current GraphQL Document Parsing spans have no processing-type tag. Removeparsefrom this list (or update the instrumentation) so the migration table reflects values consumers can actually observe.
website/content/docs/fusion/migration/migrate-from-15-to-16.md:987
- For an anonymous client operation, alias batching uses the literal
Opprefix, not<name>(AliasBatchedRequestBodyfalls back toOpwhen the operation name is null). Please include that anonymous shape here so the documented name matches the generated GraphQL document.
- With subgraph alias batching enabled, the merged operation is named `<name>_<shortHash>_Batch_<compositionHash>`, where the trailing 16 hex digits identify the composition of the batch.
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1266
- This blanket wording also covers failures represented as exceptions, but the execution and HTTP exception paths call
Activity.AddExceptionand do not create agraphql.errorevent. Please qualify the section as GraphQL/IError errors and mention that exception failures remain standard exception events, otherwise consumers will look for the wrong event type.
Errors are now reported as `graphql.error` events, rather than only as span attributes. Each event carries `graphql.error.message`, and where available `graphql.error.code`, `graphql.field.path`, `graphql.field.schema_coordinate`, `graphql.document.locations`, and the operation and document attributes.
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1243
graphql.field.aliasis already documented immediately above as the rename target forgraphql.selection.name, so it is not a new attribute. Keeping it in both tables makes the migration classification contradictory; remove this row from New attributes.
| `graphql.field.alias` | The response name of the resolved field. |
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1268
ResolverErrormarks the field-resolver span but does not add agraphql.errorevent there; the event is added later to the root result span. Likewise, exception-based HTTP request failures add only anexceptionevent. This sentence should distinguish the span recording the error status from the span carrying the GraphQL error event.
Each error is emitted on the span that observed it. Errors in the operation result land on the root `GraphQL Operation` span, HTTP parse and request errors on their HTTP spans, and subscription resolver errors on the `GraphQL Subscription Event` span for that event.
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1270
MaxErrorEventsdoes not make every non-root span emit an uncapped event: document parsing, validation, complexity, variable-coercion, and operation-execution spans do not addgraphql.errorevents themselves. Qualify this sentence to the HTTP and subscription/error callbacks that actually emit uncapped events.
`MaxErrorEvents` (default `10`) and the `graphql.error.count` attribute apply to the operation-result errors on the root span only. The other spans emit an event per error with no cap and no count attribute.
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1246
graphql.document.locationsis also already listed as the new name in the renamed-attributes table (graphql.error.location.line/columnabove). It should not appear in New attributes as well, otherwise the guide says the same attribute is both renamed and newly introduced; remove this duplicate row.
| `graphql.document.locations` | The document locations of an error, as an array of `line` / `column` pairs. |
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
There was a problem hiding this comment.
🟡 Changes recommended
Six unresolved documentation corrections should be addressed before approval.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (4)
website/content/docs/fusion/migration/migrate-from-15-to-16.md:1047
GraphQL Operation Planningis not gateway-specific: the standard Hot Chocolate diagnostic listener also emits this span forCompileOperation(src/HotChocolate/Diagnostics/src/Diagnostics/Spans/CompileOperationSpan.cs:12-24), and the shared migration table above already documents it. Please remove this row from the Fusion-only list or label it as shared so readers do not treat it as a gateway-exclusive span.
Two spans are specific to the gateway:
website/content/docs/fusion/migration/migrate-from-15-to-16.md:1052
- Event-stream execution nodes also omit the
graphql.source_schema.*attributes.ExecutePlanNodeSpan.SetSourceSchemaTagshandles only operation and operation-batch nodes, so this exception list should include event-stream steps to avoid implying that subscription plan nodes carry source-schema tags.
| `GraphQL Step Execution` | One span per execution node. Carries `graphql.processing.type=step_execute`, `graphql.operation.step.id`, `graphql.operation.step.kind`, and `graphql.operation.step.plan.id`. A step that targets a source schema also carries `graphql.source_schema.name` plus either the `graphql.source_schema.operation.*` or the `graphql.source_schema.batch.*` attributes; introspection and node steps carry none of them. |
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1234
- This sentence is too broad because
graphql.field.pathremains a span attribute on resolver spans (ResolveFieldSpansets it), even though the oldgraphql.error.pathvalue is now carried by thegraphql.errorevent. Clarify that the error path and location mappings moved to events rather than implying thatgraphql.field.pathis no longer a span attribute.
The last two are no longer span attributes. They are attributes of the `graphql.error` event described in [Error events](#error-events).
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1247
- Event-stream steps also have no
graphql.source_schema.*attributes, but this row names only introspection and node steps. Add event-stream steps to the exception list so the shared attribute table matches the actualGraphQL Step Executiontag mapping.
| `graphql.source_schema.name` | Gateway only. The name of the source schema a step targets. Set only on steps that target one, so introspection and node steps carry no `graphql.source_schema.*` attributes. |
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
There was a problem hiding this comment.
🟡 Changes recommended
The reviewed documentation contains unresolved inaccuracies and omissions.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (5)
website/content/docs/fusion/migration/migrate-from-15-to-16.md:979
- The claim that one request's short hash is shared by every step is false for the deferred-plan case documented below: the planner sets
ShortHashto the literaldefer, so those generated names do not use the document hash. Qualify this statement to non-deferred steps or mention the exception here.
The short hash is the first eight characters of the client operation document hash, which is MD5 in hex by default and therefore changes if you configure a different [document hash provider](#document-hash-provider-configuration). One request has one short hash, shared by every step of its main operation. It changes whenever any byte of the document text changes, including whitespace and comments, because the document is hashed as received rather than normalized.
website/content/docs/fusion/migration/migrate-from-15-to-16.md:1054
- Alias batching is an exception to the join-key description here.
AliasBatchedRequestBodycomposes the wire name with_Batch_<compositionHash>, whileExecutePlanNodeSpanrecords the plan operation's base name, so the gateway step span does not carry the name a subgraph logs for an alias-batched request. Distinguish native operation-batch steps from alias batching and do not promisegraphql.source_schema.operation.nameas the join key for the latter.
On a step that sends a single operation, `graphql.source_schema.operation.name` carries the generated operation name described in [Generated subgraph operation names changed](#generated-subgraph-operation-names-changed), which makes it the join key between a gateway trace and the matching subgraph log line. A batched step does not carry it: those spans get `graphql.source_schema.batch.operation_count` instead, so join them on `graphql.source_schema.name` and the span timing.
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1218
- This wording overstates the rename:
graphql.selection.type,graphql.selection.hierarchy, andgraphql.selection.field.isDeprecatedare listed above as removed with no replacement. Limit this sentence to the field-related selection attributes so readers do not look for replacements that do not exist.
The `graphql.selection.*` family was replaced by `graphql.field.*`:
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1229
- The old table included the Fusion renames, but this replacement drops them entirely. Users migrating gateway dashboards from
graphql.fusion.node.schemaandgraphql.fusion.node.typeare not told to move to the newgraphql.source_schema.nameandgraphql.operation.step.kindattributes.
| `graphql.dataLoader.keys.count` | `graphql.dataloader.batch.size` |
website/content/docs/hotchocolate/migrating/migrate-from-15-to-16.md:1264
- This incorrectly makes the gateway the only exception to the
exception-event behavior. On the Hot Chocolate server, resolver and variable-coercion exceptions can be converted into GraphQL errors, which are emitted asgraphql.errorevents carryingexception.*fields; only exceptions handled by request/transport exception callbacks use a standardexceptionevent. Please narrow this distinction so users do not expect a standard exception event for every server exception.
GraphQL errors are now reported as `graphql.error` events, rather than only as span attributes. Each event carries `graphql.error.message`, and where available `graphql.error.code`, `graphql.field.path`, `graphql.field.schema_coordinate`, `graphql.document.locations`, and the operation and document attributes. On the Hot Chocolate server, failures represented as exceptions remain standard `exception` events. The gateway is the exception: its execution node, source schema transport, source schema store, and subscription event callbacks pass the exception to a `graphql.error` event, which then carries the exception fields.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
Summary
Brings the v15 to v16 migration guides in line with the telemetry both products actually emit.
Hot Chocolate guide:
graphql.selection.*tographql.field.*family andgraphql.errors.counttographql.error.count.graphql.processing.type, thegraphql.operation.step.*family, and thegraphql.source_schema.*family.graphql.errorspan events and theirMaxErrorEventscap, the newIncludeOperationNameInSpanNameoption, and that a caller cancellation no longer marks a span as an error.Fusion guide:
{name}_{counter}in v15 to{name}_{shortHash}_{stepId}in v16. This is the name a subgraph records in its own logs and traces, so it surfaces on upgrade without any gateway-side change.HotChocolate.Fusion.Diagnosticspackage and the two gateway-specific spans, cross-linked to the shared attribute tables in the Hot Chocolate guide.The span and attribute lists were derived from the code on both sides rather than from recollection: the v15 names from
ActivityEnricheronmain-version-15, and the v16 names by mapping everySemanticConventionsconstant to its call sites, so attributes that are declared but never set are excluded.