Repository navigation
Conversation
Map OpenTelemetry spans carrying a GraphQL operation type to the graphql operation and retain their operation-level span name as the description. This aligns OpenTelemetry GraphQL spans with Sentry's GraphQL operation category without treating operation spans as native resolver-level spans. Refs #4547 Co-Authored-By: Claude <[email protected]>
Contributor
PR risk: mediumFor commit Main concerns: data sent to Sentry, reach, host performance. This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
Bring the GraphQL span alignment branch onto the latest 9.x.x state, including the OpenTelemetry 2.34.0 messaging semantic convention updates. Resolve the changelog conflict while retaining the GraphQL fix entry. Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
This branch has not been deployed
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.
📜 Description
Maps OpenTelemetry spans with
graphql.operation.typeto Sentry'sgraphqlspan operation while preserving the OpenTelemetry operation-level span name, such asquery GreetingQuery, as the description.GraphQL detection takes precedence over HTTP attributes when both are present. The mapping intentionally remains operation-level because OpenTelemetry does not provide the parent type needed to reproduce native resolver descriptions such as
Task.assignee.The OpenTelemetry GraphQL property migration is handled separately in #6750.
💡 Motivation and Context
OpenTelemetry GraphQL spans currently use their complete span name as both the Sentry operation and description. This produces operations such as
query GreetingQueryinstead of grouping the spans under Sentry's establishedgraphqloperation.The new mapping aligns the operation category while retaining the useful named operation as the span description.
Refs #4547
💚 How did you test it?
make format api./gradlew ':sentry-opentelemetry:sentry-opentelemetry-core:test' --tests='*SpanDescriptionExtractorTest*'./gradlew ':sentry-spring-boot:integrationTestOtelAgent' ':sentry-spring-boot:integrationTestOtelAgentWithoutAutoInit' --tests='*GraphqlIntegrationTest*'All 33 extractor tests pass. All six GraphQL scenarios pass in both agent initialization modes.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Database span alignment remains separate from this GraphQL-only change.