feat(names): Include GraphQL operation names in span names - #626
feat(names): Include GraphQL operation names in span names#626andreiborza wants to merge 1 commit into
Conversation
Co-Authored-By: GPT-6 <codex@openai.com>
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Names
Other
Bug Fixes 🐛
Internal Changes 🔧Deps
Other
🤖 This preview updates automatically when you update the PR. |
|
Otel does warn that these could be high-cardinality, but in practice we've never seen that. I also tried looking through public github repos to see if users define dynamic operations and didn't find any. Happy to close/revise if anyone has more experience with GraphQL and thinks this is a terrible idea. |
Lms24
left a comment
There was a problem hiding this comment.
I'm generally fine with this and happy to approve but I feel like this needs a product-sign-off.
Just one technical suggestion: Let's add a sentence about diverging from the OTel naming schema in otel_notes.
Includes
graphql.operation.namein GraphQL span names when available, so a named query becomesGraphQL query findBookByIdinstead ofGraphQL query. The existing fallbacks still cover anonymous operations and processing spans.Operation names are normally stable, meaningful identifiers, and keeping them lets users distinguish queries and mutations in span grouping. This accepts the possibility of client-generated high-cardinality names discussed in #615, and aligns with OTel naming apart from our
GraphQLprefix.