Skip to content

feat(names): Include GraphQL operation names in span names - #626

Open
andreiborza wants to merge 1 commit into
mainfrom
feat/graphql-operation-names
Open

feat(names): Include GraphQL operation names in span names#626
andreiborza wants to merge 1 commit into
mainfrom
feat/graphql-operation-names

Conversation

@andreiborza

Copy link
Copy Markdown
Member

Includes graphql.operation.name in GraphQL span names when available, so a named query becomes GraphQL query findBookById instead of GraphQL 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 GraphQL prefix.

Co-Authored-By: GPT-6 <codex@openai.com>
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Add sveltekit.* attributes emitted by SvelteKit's native spans by Lms24 in #611
  • Add browser.navigation.type, move navigation.* to router.navigation.* by logaretm in #600
  • Add langchain.chain.name (deprecated) in favor of gen_ai.pipeline.name by RulaKhaled in #599
  • Add browser.paint.type by Lms24 in #606

Names

  • Include GraphQL operation names in span names by andreiborza in #626
  • Add FAAS function span name and description rules by Lms24 in #617
  • Add function span name and description rules by Lms24 in #618
  • Add browser.* span name and description rules by Lms24 in #607
  • Add cache span name rules by Lms24 in #605

Other

  • (descriptions) Add graphql span description rules by Lms24 in #616
  • (op) Add mobile OTA update span operations by antonis in #540

Bug Fixes 🐛

  • (descriptions) Add graphql-enhanced http.client span description template by Lms24 in #613

Internal Changes 🔧

Deps

  • Bump browserslist from 4.28.2 to 4.28.8 by dependabot in #614
  • Bump fast-uri from 3.1.5 to 3.1.7 by dependabot in #612

Other

  • (descriptions) Fix http.client span description example by Lms24 in #603
  • (names) Add OTel divergence note for graphql span names by Lms24 in #615

🤖 This preview updates automatically when you update the PR.

@andreiborza
andreiborza marked this pull request as ready for review September 7, 2026 14:29
@andreiborza
andreiborza requested a review from mydea September 7, 2026 14:29
@andreiborza

Copy link
Copy Markdown
Member Author

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 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants