-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add graphql integration option to automatically rename root spans based on graphql.operation.name
#13238
Comments
mydea
added a commit
that referenced
this issue
Aug 8, 2024
…13248) This introduces a new option for the `graphqlIntegration`, `useOperationNameForRootSpan`, which is by default `true` but can be disabled in integration settings like this: `Sentry.graphqlIntegration({ useOperationNameForRootSpan: true })`. With this setting enabled, the graphql instrumentation will update the `http.server` root span it is in (if there is one) will be appended to the span name. So instead of having all root spans be `POST /graphql`, the names will now be e.g. `POST /graphql (query MyQuery)`. If there are multiple operations in a single http request, they will be appended like `POST /graphql (query Query1, query Query2)`, up to a limit of 5, at which point they will be appended as `+2` or similar. Closes #13238
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Root spans are currently named by otel and are cumbersome to retroactively change to a more meaningful name. See #12887 (comment).
Brainstorm
Add an option akin to
inferRootSpanNameFromGraphQLOperation: boolean
(naming TBD) to our GraphQL instrumentation to update the name of the root span to that of the (last) child span that has agraphql.operation.name
set.The text was updated successfully, but these errors were encountered: