Update OpenTelemetry.Api (1.1.0 -> 1.15.3)#9610
Merged
glen-84 merged 4 commits intomain-version-15from Apr 29, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates HotChocolate Diagnostics’ OpenTelemetry integration to align with the newer OpenTelemetry.Api package, updating span status/exception APIs and regenerating the affected diagnostics snapshots.
Changes:
- Bump
OpenTelemetry.Apifrom1.1.0to1.15.3. - Replace deprecated OpenTelemetry
Status.*usage withActivityStatusCode.*in diagnostics scopes/listeners. - Update diagnostics test snapshots to reflect the new status representation (no longer emitting
otel.status_codetags).
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Directory.Packages.props | Updates OpenTelemetry.Api package version. |
| src/HotChocolate/Diagnostics/src/Diagnostics/Scopes/ValidateDocumentScope.cs | Switch status setting to ActivityStatusCode. |
| src/HotChocolate/Diagnostics/src/Diagnostics/Scopes/ParseDocumentScope.cs | Switch status setting to ActivityStatusCode. |
| src/HotChocolate/Diagnostics/src/Diagnostics/Scopes/ExecuteRequestScope.cs | Switch status setting to ActivityStatusCode. |
| src/HotChocolate/Diagnostics/src/Diagnostics/Scopes/ExecuteOperationScope.cs | Switch status setting to ActivityStatusCode. |
| src/HotChocolate/Diagnostics/src/Diagnostics/Scopes/CompileOperationScope.cs | Switch status setting to ActivityStatusCode. |
| src/HotChocolate/Diagnostics/src/Diagnostics/Scopes/CoerceVariablesScope.cs | Switch status setting to ActivityStatusCode. |
| src/HotChocolate/Diagnostics/src/Diagnostics/Listeners/ActivityServerDiagnosticListener.cs | Switch HTTP activity status setting to ActivityStatusCode. |
| src/HotChocolate/Diagnostics/src/Diagnostics/Listeners/ActivityExecutionDiagnosticListener.cs | Switch execution activity status setting to ActivityStatusCode. |
| src/HotChocolate/Diagnostics/src/Diagnostics/ActivityEnricher.cs | Updates exception recording API (RecordException → AddException). |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Validation_error_when_rename_root_is_activated.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Parsing_error_when_rename_root_is_activated.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Http_Post_with_extensions_map.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Http_Post_variables_are_not_automatically_added_to_activities.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Http_Post_parser_error.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Http_Post_ensure_list_path_is_correctly_built.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Http_Post_capture_deferred_response.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Http_Post_add_variables_to_http_activity.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Http_Post_add_query_to_http_activity.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Http_Post_SingleRequest_GetHeroName_Default.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Http_Post_SingleRequest_GetHeroName.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/ServerInstrumentationTests.Http_Get_SingleRequest_GetHeroName.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Track_events_of_a_simple_query_detailed.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Track_events_of_a_simple_query_default.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Track_data_loader_events_with_keys.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Track_data_loader_events.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Ensure_that_the_validation_activity_has_an_error_status.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Ensure_operation_name_is_used_as_request_name.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Create_operation_display_name_with_4_field.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Create_operation_display_name_with_3_field.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Create_operation_display_name_with_1_field_and_op.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Create_operation_display_name_with_1_field.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Cause_a_resolver_error_that_deletes_the_whole_result_deep.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Cause_a_resolver_error_that_deletes_the_whole_result.snap | Snapshot updated for new status/tag output. |
| src/HotChocolate/Diagnostics/test/Diagnostics.Tests/snapshots/QueryInstrumentationTests.Allow_document_to_be_captured.snap | Snapshot updated for new status/tag output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9607