Skip to content

Update OpenTelemetry.Api (1.1.0 -> 1.15.3)#9610

Merged
glen-84 merged 4 commits into
main-version-15from
gai/update-open-telemetry-api
Apr 29, 2026
Merged

Update OpenTelemetry.Api (1.1.0 -> 1.15.3)#9610
glen-84 merged 4 commits into
main-version-15from
gai/update-open-telemetry-api

Conversation

@glen-84

@glen-84 glen-84 commented Apr 28, 2026

Copy link
Copy Markdown
Member

Closes #9607

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

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.Api from 1.1.0 to 1.15.3.
  • Replace deprecated OpenTelemetry Status.* usage with ActivityStatusCode.* in diagnostics scopes/listeners.
  • Update diagnostics test snapshots to reflect the new status representation (no longer emitting otel.status_code tags).

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 (RecordExceptionAddException).
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.

@glen-84 glen-84 merged commit 4278585 into main-version-15 Apr 29, 2026
105 checks passed
@glen-84 glen-84 deleted the gai/update-open-telemetry-api branch April 29, 2026 12:16
This was referenced Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants