Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions develop-docs/sdk/expected-features/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -211,22 +211,19 @@ Write events to disk before attempting to send, so that they can be retried in t

When SDKs receive an `HTTP 2xx` status code response from Sentry, they **MUST** consider it as a successful send.

If Sentry returns an `HTTP 4xx` or `HTTP 5xx` status code, SDKs:

- **MUST** discard the envelope
- **MUST** record a [client report](/sdk/telemetry/client-reports) with the discard reason `send_error`, except for an `HTTP 429` response, see below.
If Sentry returns an `HTTP 4xx` or `HTTP 5xx` status code, SDKs **MUST** discard the envelope and record a [client report](/sdk/telemetry/client-reports/#network-failure-recording) as specified in the client reports spec.

For an [`HTTP 413 Content Too Large`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413) response, SDKs:

* **MUST** discard the envelope and record a [client report](/sdk/telemetry/client-reports) with the discard reason `send_error`. Upstream usually records a [client report](/sdk/telemetry/client-reports) for oversized envelopes, but not always. Double-counting is preferable to not counting, so users are aware of all dropped envelopes. Since client reports are not expected to be fully accurate, we accept this tradeoff for now (Jan 7th 2026). In the future, we may add error responses to indicate when SDKs should record a client report.
* **MUST** discard the envelope and record a [client report](/sdk/telemetry/client-reports/#network-failure-recording).
* **MUST NOT** retry sending the envelope.
* **SHOULD** log an error, informing users that the envelope was discarded due to size limits.
* **MAY** add information from the response body to the logged error. If doing so, SDKs **MUST** be aware that Relay can change or remove information in the response body for an `HTTP 413` at any time without notice.

For an [`HTTP 429 Too Many Requests`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) response, SDKs:

- **MUST** respect the [rate limiting rules](/sdk/expected-features/rate-limiting/), such as correctly parsing the retry-header.
- **MUST** discard the envelope, but **MUST NOT** record a [client report](/sdk/telemetry/client-reports), because the upstream already does this. Doing this would double-count client reports for discarded envelopes.
- **MUST** discard the envelope, but **MUST NOT** record a [client report](/sdk/telemetry/client-reports/#network-failure-recording), because the upstream already does this.
- **MUST NOT** retry sending the envelope.

SDKs **MAY** retry sending the envelope when a network error occurs, such as:
Expand All @@ -235,7 +232,9 @@ SDKs **MAY** retry sending the envelope when a network error occurs, such as:
* DSN resolution failure
* Connection reset by peer

When other failures occur, like those caused by processing the file in the SDK itself, SDKs **MUST** discard the envelope and record a [client report](/sdk/telemetry/client-reports) with the discard reason `internal_sdk_error`. Otherwise, the SDK might end up in an endless retry loop.
When other failures occur, like those caused by processing the file in the SDK itself, SDKs **MUST** discard the envelope and record a [client report](/sdk/telemetry/client-reports/#network-failure-recording) with the discard reason `internal_sdk_error`. Otherwise, the SDK might end up in an endless retry loop.

See the [Client Reports — Network Failure Recording](/sdk/telemetry/client-reports/#network-failure-recording) spec for the full set of client report recording requirements for each HTTP status code.


#### Additional capabilities
Expand Down
20 changes: 0 additions & 20 deletions develop-docs/sdk/foundations/transport/envelope-items.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -203,26 +203,6 @@ details.
_None_


### Client Report

Item type `"client_report"` contains a client report payload encoded in JSON.

See the <Link to="/sdk/telemetry/client-reports/">client reports</Link> documentation for the payload
details.

**Constraints:**

- This Item may occur multiple times per Envelope, but please avoid sending more client reports than necessary.
- This Item can either be included in an Envelope with other Items, or it may be sent by itself.

**Envelope Headers:**

_None_

**Additional Item Headers:**

_None_

### Replay Event

Item type `"replay_event"` contains a replay payload encoded in JSON.
Expand Down
Loading
Loading