Repository navigation
Conversation
OpenTelemetry replaced the GraphQL option used to add operation names to span names. The deprecated property is ignored when the v3 semantic conventions preview is enabled, causing named operations such as GreetingQuery to be exported with a generic span name. Set the current property and run the GraphQL agent integration tests under the v3 preview to prevent a regression. Refs #4547 Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
PR risk: mediumFor commit Main concerns: public contract, reach, dependencies customers inherit. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
Read the merged OpenTelemetry configuration before applying Sentry's GraphQL span naming default. Preserve the current property when configured and migrate values supplied through the deprecated property instead of overriding customer settings. Keep integration coverage for the default semantic conventions and add equivalent coverage for the v3 preview. Refs #4547 Co-Authored-By: Claude <noreply@anthropic.com>
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
Updates the OpenTelemetry GraphQL configuration property that Sentry sets by default from the deprecated
otel.instrumentation.graphql.add-operation-name-to-span-name.enabledkey tootel.instrumentation.graphql.operation-name-in-span-name.enabled.The default is now applied through OpenTelemetry's merged configuration. An explicitly configured current property takes precedence, while a value provided through the deprecated property is migrated to the current property. This preserves customer settings supplied through system properties, environment variables, or other OpenTelemetry configuration sources.
The GraphQL agent integration tests run with both the default semantic conventions and OpenTelemetry's v3 semantic conventions preview, where the deprecated key is ignored.
💡 Motivation and Context
OpenTelemetry renamed the property that adds GraphQL operation names to span names. Sentry continued setting the deprecated property, so enabling the v3 semantic conventions preview caused operation names such as
GreetingQueryto be omitted from GraphQL span names. This made named GraphQL operations appear with generic span names instead of preserving the operation name.Reading the merged configuration also avoids overriding customers who explicitly enable or disable operation names using either property name.
Refs #4547
💚 How did you test it?
make format api./gradlew ':sentry-opentelemetry:sentry-opentelemetry-agentcustomization:test' --tests='*SentryAutoConfigurationCustomizerProviderTest*'./gradlew ':sentry-spring-boot:integrationTestOtelAgent' ':sentry-spring-boot:integrationTestOtelAgentWithoutAutoInit' --tests='*Graphql*IntegrationTest*'The configuration unit tests pass. The six GraphQL scenarios pass with both the default and v3 semantic conventions in both agent initialization modes.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None.