Skip to content

feat(envelopes): Add envelope item constraints summary#16666

Open
philipphofmann wants to merge 2 commits intomasterfrom
philipp/envelope-item-constraints
Open

feat(envelopes): Add envelope item constraints summary#16666
philipphofmann wants to merge 2 commits intomasterfrom
philipp/envelope-item-constraints

Conversation

@philipphofmann
Copy link
Member

@philipphofmann philipphofmann commented Mar 4, 2026

DESCRIBE YOUR PR

Add an "Envelope Item Constraints" section to the envelope items spec documenting which envelope item types can be combined in a single envelope. This addresses a gap in SDK developer guidance for telemetry processor design.

Closes #16188

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

Co-Authored-By: Claude noreply@anthropic.com

Add "Envelope Item Constraints" section to envelope-items.mdx documenting
which envelope item types can be combined in a single envelope, covering
mutual exclusivity, spans, logs, metrics, sessions, attachments, check-ins,
client reports, replays, and user reports. Link to the new section from
the telemetry processor page.

Closes #16188

Co-Authored-By: Claude <noreply@anthropic.com>

Agent transcript: https://claudescope.sentry.dev/share/UKe0VPmx1a4bth6nObnlSXkEfwtSCJg2kMCkDvFnubo
@vercel
Copy link

vercel bot commented Mar 4, 2026

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

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment Mar 4, 2026 8:53am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sentry-docs Ignored Ignored Preview Mar 4, 2026 8:53am

Request Review

1. **Mutual exclusivity**:
- [`event`](#event) and [`transaction`](#transaction) envelope items are mutually exclusive.
- [`feedback`](/sdk/telemetry/feedbacks/#envelope-item-constraints) and [`transaction`](#transaction) envelope items are mutually exclusive.
2. **Spans**: An envelope **MUST** contain at most one envelope item containing spans, and all spans **MUST** share a single traceID; see [Span Buffer](/sdk/telemetry/spans/span-buffer/).
Copy link
Member Author

Choose a reason for hiding this comment

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

@cleptric I'm not 100% sure if that's actually the case that you can only send one envelope item containing spans per envelope. If not, I will adjust the docs here accordingly.


## Envelope Item Constraints

SDKs **SHOULD NOT** combine different types of telemetry data in the same envelope, because Relay enforces [rate limits](/sdk/foundations/transport/rate-limiting/) per [data category](/sdk/foundations/transport/rate-limiting/#definitions), and mixing types makes this enforcement more expensive. Exceptions to this rule are listed below (e.g., sessions, client reports, and attachments **MAY** be combined with other items).
Copy link
Member Author

Choose a reason for hiding this comment

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

@cleptric, I added a comment for this on the initial GitHub issue #16188 (comment), but I'm not 100% sure if this is actually the case.

And maybe we should even change this to: SDKs MUST NOT combine different types of telemetry data in the same envelope. Please let me know.

@philipphofmann philipphofmann changed the title docs(sdk): Add envelope item constraints section feat(envelopes): Add envelope item constraints summary Mar 4, 2026
@philipphofmann philipphofmann requested a review from cleptric March 4, 2026 08:50
@philipphofmann philipphofmann marked this pull request as ready for review March 4, 2026 08:50
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.

Telemetry Processor: What telemetry data can be combined

1 participant