Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Diagnostics] Align to OTEL spec Pt. 2 - #9515

#9515
Merged
tobias-tengler merged 22 commits into
mainChilliCream/graphql-platform:mainfrom
tte/align-to-otel-spec-2ChilliCream/graphql-platform:tte/align-to-otel-spec-2Copy head branch name to clipboard
Apr 30, 2026
Merged

[Diagnostics] Align to OTEL spec Pt. 2#9515
tobias-tengler merged 22 commits into
mainChilliCream/graphql-platform:mainfrom
tte/align-to-otel-spec-2ChilliCream/graphql-platform:tte/align-to-otel-spec-2Copy head branch name to clipboard

Conversation

@tobias-tengler

Copy link
Copy Markdown
Member

No description provided.

@tobias-tengler
tobias-tengler force-pushed the tte/align-to-otel-spec-2 branch from 1944929 to 1c5d3e5 Compare April 30, 2026 12:19
…emetry GraphQL semantic conventions

Renames `graphql.selection.*` to `graphql.field.*`, folds `graphql.error.path`
and `graphql.error.locations` into `graphql.field.path` and
`graphql.document.locations`, and adds the `request` value to
`graphql.processing.type` for the root span. The `graphql.error` event is now
emitted on the root `GraphQL Operation` span only, with combined GraphQL and
exception attributes per the spec, capped via the new `MaxErrorEvents` option
(default 10). Resolver, validation and HTTP transport spans set `error.type`
from the GraphQL error code when present, falling back to phase-appropriate
identifiers (`EXECUTION_ERROR`, `GRAPHQL_VALIDATION_FAILED`,
`GRAPHQL_PARSE_FAILED`).
…h OpenTelemetry GraphQL semantic conventions

Renames the Fusion gateway's `graphql.source.*` tags to `graphql.source_schema.*`,
removes the `graphql.source.id` attribute (not in spec, redundant with the
schema name), and drops `graphql.source.operation.type` since it duplicated
`graphql.operation.type`. Inherits the root-span `graphql.processing.type=request`
tag and the relocated `graphql.error` event from the shared diagnostics core.
Adds three new tests covering the OpenTelemetry GraphQL alignment behaviour:
the `MaxErrorEvents` cap on root-span error events with the full count still
recorded via `graphql.error.count`, and the `error.type` policy that prefers
`extensions.code` over the phase-appropriate fallback.
…parsing span

Adds the previously-omitted `graphql.processing.type=parse` tag to the
`GraphQL Document Parsing` span. The spec requires this attribute on every
processing-phase span; the prior comment about HTTP-middleware parsing no
longer applies because the parsing span only fires on the dedicated execution
pipeline phase.
…alignment

Updates the v15 to v16 migration guide to cover the renamed, removed, and
added telemetry attributes, the relocation of the `graphql.error` event to the
root span, the new `MaxErrorEvents` option, and the `error.type` value policy.
@github-actions github-actions Bot added the 📚 documentation This issue is about working on our documentation. label Apr 30, 2026
… reflect production error.type path

Most diagnostics tests previously constructed errors via plain
GraphQLException("...") with no code, which caused error.type to
fall back to EXECUTION_ERROR in every snapshot. Add SetCode to the
test resolvers so the snapshots exercise the extensions.code path
through SetGraphQLErrorType. The dedicated GraphQLError_WithoutExtensionsCode_FallsBackToExecutionError
test continues to validate the static fallback via a new bare resolver.
…no underlying exception

The graphql.error event was emitting fabricated values for exception.type,
exception.message, and exception.stacktrace when the GraphQL error had no
underlying CLR exception (e.g. exception.type would be "GRAPHQL_ERROR",
stacktrace would be empty). exception.* are OpenTelemetry standard
attributes describing a real runtime exception, so synthesizing them
misrepresents the data.

Now exception.{type,message,stacktrace} are only added when error.Exception
is not null. The GraphQL error message remains available via the
graphql.error.message attribute. The locked decision "always emit
exception.{type,message,stacktrace}" was about the WITH-exception case;
fabricating them when no exception is attached was an oversight.

Snapshots in HotChocolate.Diagnostics.Tests are regenerated to reflect the
removal. The v15 to v16 migration doc is updated to match.
…xception.* alignment

- error.type now reflects the GraphQL error code (HC0067, HC0020, etc.) or the
  underlying CLR exception type (System.Net.Http.HttpRequestException) instead
  of the EXECUTION_ERROR fallback in cases where a more specific value is
  available.
- exception.* attributes are removed from graphql.error events when no
  underlying CLR exception is attached.
…ing-span document.id

Removes the source-schema-request span that was emerging into a graphql.client-shaped
outbound span; we are not ready to commit to the spec's graphql.client surface yet.
Also drops graphql.document.id from the planning span (already carried by the parent
request span and not in the spec's plan-span attribute list).
…e fails

Previously the parsing span left Status as Unset and emitted no error.type when
the document failed to parse, even though the spec requires both. The span now
sets Status=Error and derives error.type from the first error (extensions.code
> exception type > GRAPHQL_PARSE_FAILED fallback).
…aphql.dataloader.*

Renames the openBatches and dispatchedBatches attributes on the BatchEvaluated
and BatchDispatched events to graphql.dataloader.batches.open and
graphql.dataloader.batches.dispatched, keeping every diagnostics attribute under
the graphql.* namespace and avoiding collisions with non-graphql instruments.
Documents both as HC extensions in the v16 migration guide.
GraphQL errors that originate from nested source-schema resolvers reach the
diagnostics layer without their field path because Fusion's source-schema
error remapping discards it. Tracked at #9624.
Inject IResolverContext into resolvers that throw GraphQLException and pass
the resolver path through ErrorBuilder.SetPath, so the test errors look like
realistic production errors that carry their location. Also fixes the deep
resolver test, whose query previously failed at validation because the path
ended on a Deeper field that did not declare causeFatalError.
… span error.type

The OpenTelemetry field execution span explicitly flips the precedence used by
phase spans: the exception type FQN should be preferred, with the GraphQL
extensions code as a secondary source. Adds a preferException flag to
SetGraphQLErrorType and uses it from the resolver listener so an
InvalidOperationException thrown from a resolver surfaces as
"System.InvalidOperationException" on the field span. Adds a regression test
covering a nullable resolver field that throws a plain .NET exception.
@tobias-tengler
tobias-tengler marked this pull request as ready for review April 30, 2026 22:18
Copilot AI review requested due to automatic review settings April 30, 2026 22:18
@tobias-tengler
tobias-tengler merged commit 0617874 into main Apr 30, 2026
137 checks passed
@tobias-tengler
tobias-tengler deleted the tte/align-to-otel-spec-2 branch April 30, 2026 22:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns HotChocolate (core + Fusion) diagnostics instrumentation with the OpenTelemetry GraphQL semantic conventions by updating span tags/events, adding error.type propagation, and adjusting tests/snapshots accordingly.

Changes:

  • Emit graphql.error activity events (capped via new MaxErrorEvents) and standardize error.type tagging across request/execution/transport failures.
  • Rename/realign semantic convention tag keys (e.g., graphql.errors.countgraphql.error.count, selection tags → field tags, source tags → source_schema tags) and add graphql.processing.type=request to root spans.
  • Add Fusion-specific diagnostic scope ExecuteSourceSchemaRequest(...) around source schema HTTP calls and update all affected snapshots.

Reviewed changes

Copilot reviewed 93 out of 93 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
website/src/docs/hotchocolate/v16/migrating/migrate-from-15-to-16.md Removes an internal/TODO Fusion diagnostics migration block from v16 migration docs.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.RequestDetails_None_ExcludesAllDetails.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.RequestDetails_DocumentOnly_IncludesDocumentTag.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.RequestDetails_Default_IncludesIdHashOperationNameExtensions.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.RequestDetails_All_IncludesAllDetails.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.Http_Post_With_Extensions_Map.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.Http_Post_Variables_Are_Not_Automatically_Added_To_Activities.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.Http_Post_Single_Request_Default.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.Http_Post_Single_Request.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.Http_Post_Parser_Error.snap Updates expected parse error event shape/tag keys (graphql.error, graphql.document.locations, error.type).
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.Http_Post_Add_Variables_To_Http_Activity.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.Http_Get_Single_Request.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityServerDiagnosticListenerTests.Http_Get_SDL_Download.snap Updates expected activity serialization (Kind).
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.ValidationError_UnknownField_ReportsErrorStatus.snap Updates expected validation error tagging and error event placement.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.UntrustedDocumentRejected_RecordsEvent.snap Updates expected request error tagging + graphql.error event emission.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.Track_Events_Of_A_Simple_Query_Default.snap Updates expected activity serialization/tags to new conventions.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.Track_Events_Of_A_Query_With_Multiple_Sources.snap Updates expected source schema tags and error count tag key.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.SubscriptionEvent_Records_Subscription_Event_Span.snap Updates expected subscription event span serialization/tag keys.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.Source_Schema_Transport_Error.snap Updates expected error.type tagging and new graphql.error event shape.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.PersistedOperation_LoadsFromStorage_DefaultScopes.snap Updates persisted operation id and expected tags.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.ParsingError_InvalidGraphQLDocument_ReportsErrorStatus.snap Updates parsing error status/error.type and emitted graphql.error event.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.MultipleSources_SourceSchemaResolverError_RecordsDeeplyNestedError.snap Updates error counting/type tagging and emitted graphql.error event.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.Ensure_That_The_Validation_Activity_Has_An_Error_Status.snap Updates validation error tagging and emitted graphql.error event.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.DocumentNotFoundInStorage_RecordsEvent.snap Updates request error tagging and emitted graphql.error event.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.DocumentCache_SecondExecution_RecordsCacheHitEvent.snap Updates expected activity serialization/tag keys.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.DefaultScopes_ExcludesExecuteRequestAndParseDocumentSpans.snap Updates expected activity serialization/tag keys.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.CustomScopes_OnlyValidateAndPlan_LimitsSpans.snap Updates expected activity serialization (Kind).
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.Cause_A_Resolver_Error_That_Deletes_The_Whole_Result.snap Updates error.type tagging and emitted graphql.error event.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.Allow_Document_To_Be_Captured.snap Updates expected activity serialization/tag keys.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/snapshots/FusionActivityExecutionDiagnosticListenerTests.AllScopes_IncludesAllSpans.snap Updates expected activity serialization/tag keys.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/FusionActivityServerDiagnosticListenerTests.cs Updates test schema resolvers to create coded/pathful GraphQL errors via IResolverContext.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/FusionActivityExecutionDiagnosticListenerTests.cs Updates tests for persisted op ids + coded/pathful errors and subscription event errors.
src/HotChocolate/Fusion/test/Fusion.Diagnostics.Tests/ActivityTestHelper.cs Serializes Activity.Kind in test snapshots.
src/HotChocolate/Fusion/src/Fusion.Execution/Execution/Nodes/OperationExecutionNode.cs Wraps source schema HTTP execution in new diagnostic scope ExecuteSourceSchemaRequest.
src/HotChocolate/Fusion/src/Fusion.Execution/Diagnostics/IFusionExecutionDiagnosticEvents.cs Adds ExecuteSourceSchemaRequest event to Fusion diagnostics contract.
src/HotChocolate/Fusion/src/Fusion.Execution/Diagnostics/FusionExecutionDiagnosticEventListener.cs Adds default no-op implementation for ExecuteSourceSchemaRequest.
src/HotChocolate/Fusion/src/Fusion.Execution/Diagnostics/AggregateFusionExecutionDiagnosticEvents.cs Aggregates ExecuteSourceSchemaRequest across listeners.
src/HotChocolate/Fusion/src/Fusion.Diagnostics/Spans/ExecutePlanNodeSpan.cs Renames source tags to graphql.source_schema.* and removes operation kind tag.
src/HotChocolate/Fusion/src/Fusion.Diagnostics/Listeners/FusionActivityExecutionDiagnosticEventListener.cs Adds error.type tagging and updates how GraphQL errors are represented (type tags vs events).
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.RequestDetails_None_ExcludesAllDetails.snap Updates expected activity serialization/tag keys + graphql.processing.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.RequestDetails_DocumentOnly_IncludesDocumentTag.snap Updates expected activity serialization/tag keys + graphql.processing.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.RequestDetails_Default_IncludesIdHashOperationNameExtensions.snap Updates expected activity serialization/tag keys + graphql.processing.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.RequestDetails_All_IncludesAllDetails.snap Updates expected activity serialization/tag keys + graphql.processing.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.Http_Post_With_Extensions_Map.snap Updates expected activity serialization/tag keys + graphql.processing.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.Http_Post_Variables_Are_Not_Automatically_Added_To_Activities.snap Updates expected activity serialization/tag keys + graphql.processing.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.Http_Post_SingleRequest_GetHeroName_Default.snap Updates expected activity serialization/tag keys + graphql.processing.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.Http_Post_SingleRequest_GetHeroName.snap Updates expected activity serialization/tag keys + graphql.processing.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.Http_Post_Parser_Error.snap Updates parse error event shape/tag keys (graphql.error, graphql.document.locations, error.type).
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.Http_Post_Ensure_List_Path_Is_Correctly_Built.snap Updates expected activity serialization/tag keys and field path/alias tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.Http_Post_Capture_Deferred_Response.snap Updates expected activity serialization/tag keys and field tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.Http_Post_Add_Variables_To_Http_Activity.snap Updates expected activity serialization/tag keys + graphql.processing.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.Http_Get_SingleRequest_GetHeroName.snap Updates expected activity serialization/tag keys + graphql.processing.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityServerDiagnosticListenerTests.Http_Get_SDL_Download.snap Updates expected activity serialization (Kind).
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.VariableCoercion_WithAllScopes_RecordsCoercionSpan.snap Updates expected activity serialization/tag keys and field tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.ValidationError_UnknownField_ReportsErrorStatus.snap Adds root graphql.error event + error.type and updates validation tagging.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.UntrustedDocumentRejected_RecordsEvent.snap Adds root graphql.error event + error.type and updates error count tag key.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.Track_Events_Of_A_Simple_Query_Default.snap Updates expected activity serialization/tag keys and field tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.SubscriptionEvent_Records_Subscription_Event_Span.snap Updates subscription event span serialization/tag keys and field tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.SubscriptionEventError_Records_Subscription_Event_Error.snap Updates subscription event error tagging + emitted graphql.error event.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.ResolverException_OnNullableField_SetsErrorTypeToExceptionTypeName.snap New snapshot verifying error.type uses exception type for resolver exceptions.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.ResolverError_DeepInTree_MarksNestedFieldAsError.snap Updates deep resolver error expectations and adds root graphql.error event.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.ResolverError_AtRootLevel_MarksOperationAsError.snap Updates root-level resolver error expectations and adds root graphql.error event.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.PersistedOperation_LoadsFromStorage_DefaultScopes.snap Updates persisted operation id and expected field tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.ParsingError_InvalidGraphQLDocument_ReportsErrorStatus.snap Updates parsing error status/error.type and emitted graphql.error event.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.MaxErrorEvents_CapsErrorEventsOnRootSpan.snap New snapshot verifying root error event emission is capped by MaxErrorEvents.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.GraphQLError_WithoutExtensionsCode_FallsBackToExecutionError.snap New snapshot verifying fallback error.type=EXECUTION_ERROR when no error code is present.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.GraphQLError_WithExtensionsCode_SetsErrorTypeFromCode.snap New snapshot verifying error.type derived from GraphQL error code.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.Ensure_That_The_Validation_Activity_Has_An_Error_Status.snap Adds root graphql.error event + error.type and updates validation tagging.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.DocumentNotFoundInStorage_RecordsEvent.snap Adds root graphql.error event + error.type.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.DocumentCache_SecondExecution_RecordsCacheHitEvent.snap Updates expected activity serialization/tag keys and field tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.DefaultScopes_ExcludesExecuteRequestAndParseDocumentSpans.snap Updates expected activity serialization/tag keys and field tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.DataLoader_BatchExecution_With_Keys_RecordsBatchSpan.snap Updates DataLoader event tag keys and adds Kind serialization.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.DataLoader_BatchExecution_RecordsBatchSpan.snap Updates DataLoader event tag keys and adds Kind serialization.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.CustomScopes_OnlyValidateAndCompile_LimitsSpans.snap Updates expected activity serialization (Kind).
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.ComplexityAnalysis_Enabled_RecordsCostInSpan.snap Updates expected activity serialization/tag keys and field tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.Cause_A_Resolver_Error_That_Deletes_The_Whole_Result.snap Updates resolver error expectations and adds root graphql.error event.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.Allow_Document_To_Be_Captured.snap Updates expected activity serialization/tag keys and field tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityExecutionDiagnosticListenerTests.AllScopes_IncludesExecuteRequestAndParseDocumentSpans.snap Updates expected activity serialization/tag keys and field tags.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityDataLoaderDiagnosticListenerTests.Run_Batch_Dispatch_Coordinator_Tracks_Dispatch_Events.snap Updates DataLoader event tag keys and adds Kind serialization.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ActivityDataLoaderDiagnosticListenerTests.Run_Batch_Dispatch_Coordinator_Emits_Activity.snap Updates activity serialization (Kind).
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ActivityTestHelper.cs Serializes Activity.Kind in test snapshots.
src/HotChocolate/Diagnostics/test/Diagnostics.Tests/ActivityExecutionDiagnosticListenerTests.cs Adds new tests for error event capping and error.type derivation; updates resolver error tests to include paths/codes.
src/HotChocolate/Diagnostics/src/Diagnostics/Spans/ResolveFieldSpan.cs Renames resolve-field tags from selection-based keys to field-based keys.
src/HotChocolate/Diagnostics/src/Diagnostics/Listeners/ActivityExecutionDiagnosticListener.cs Adds error.type tagging, root propagation for validation, and subscription-event graphql.error emission.
src/HotChocolate/Diagnostics/src/Diagnostics/Listeners/ActivityDataLoaderDiagnosticListener.cs Adds error.type tagging and renames batch event tag keys.
src/HotChocolate/Diagnostics/src/Diagnostics.Core/Spans/ParsingSpan.cs Marks parsing span status/error.type based on result errors.
src/HotChocolate/Diagnostics/src/Diagnostics.Core/Spans/Http/ParseHttpRequestSpan.cs Emits graphql.error events for parse errors and sets error.type.
src/HotChocolate/Diagnostics/src/Diagnostics.Core/Spans/Http/ExecuteHttpRequestSpan.cs Emits graphql.error events for HTTP request errors and sets error.type.
src/HotChocolate/Diagnostics/src/Diagnostics.Core/Spans/ExecuteRequestSpanBase.cs Ensures graphql.processing.type=request, emits capped graphql.error events, and uses graphql.error.count.
src/HotChocolate/Diagnostics/src/Diagnostics.Core/Spans/ExecuteOperationSpan.cs Sets error.type for operation execution span on failure.
src/HotChocolate/Diagnostics/src/Diagnostics.Core/SemanticConventions.cs Adds/remaps semantic convention keys (error.type, document locations, field tags, source_schema tags, error.count).
src/HotChocolate/Diagnostics/src/Diagnostics.Core/InstrumentationOptionsBase.cs Introduces MaxErrorEvents option to cap root graphql.error events.
src/HotChocolate/Diagnostics/src/Diagnostics.Core/Extensions/ActivityExtensions.cs Adds graphql.error event emitter and error.type helpers with phase-specific fallbacks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +316 to 318
s_currentSubscriptionEventSpan.Value = span;

return span;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 documentation This issue is about working on our documentation. 🌶️ hot chocolate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.