Skip to content

docs(sdk): Add sentry.span_group develop docs#17277

Open
vgrozdanic wants to merge 2 commits intomasterfrom
docs/span-groups
Open

docs(sdk): Add sentry.span_group develop docs#17277
vgrozdanic wants to merge 2 commits intomasterfrom
docs/span-groups

Conversation

@vgrozdanic
Copy link
Copy Markdown
Member

Add develop docs for the sentry.span_group attribute namespace — a lightweight, extensible mechanism for logically grouping spans across trace boundaries.

This is needed for AI conversations and user sessions, which don't map cleanly to a single trace (a conversation can span multiple traces, or multiple conversations can exist in one trace).

The doc covers:

  • Protocol: attributes under sentry.span_group.<concept>_id namespace
  • Naming convention for new group concepts
  • Propagation via baggage header
  • SDK implementation (no new public API needed — just span attributes)

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Document the sentry.span_group attribute namespace for logical grouping
of spans across trace boundaries. Covers protocol, naming convention,
baggage propagation, and SDK implementation.

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Apr 9, 2026 8:46am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sentry-docs Ignored Ignored Preview Apr 9, 2026 8:46am

Request Review

@github-actions github-actions bot added the sdk-develop-docs PRs touching develop-docs/sdk label Apr 8, 2026
@vgrozdanic vgrozdanic marked this pull request as ready for review April 8, 2026 15:25
@vgrozdanic vgrozdanic requested a review from cleptric April 8, 2026 15:25
Comment on lines +28 to +29
"sentry.span_group.conversation_id": "conv_88234",
"sentry.span_group.session_id": "sess_00192"
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.

Should likely specify the value used here, using uuids as for trace ids would work well, imo.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Conversation id can be anything because it usually comes from the model provider (I believe OpenAI has ints as conversationId). I'll mention it.

For sessions, I'd rather not specify the exact value because that concept still requires more thinking and it is not yet fully defined how it will work, here I named it more as an example of how it would work under sentry.span_group, and until we have more details on it, I'd keep the value as vague/open as possible.

Conversation ID comes from the model provider and must be stringified.
Session ID is early-phase and shown only as an example, not a definition.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk-develop-docs PRs touching develop-docs/sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants