Skip to content

Commit f4f83fd

Browse files
authored
fix(attachments): Placeholder content-type (#17051)
Add a +json suffix to the attachment placeholder content type to signal that it is syntactically JSON. The old value is still parsed correctly for compatibility.
1 parent 04d60ae commit f4f83fd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

develop-docs/sdk/telemetry/attachments.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Trace attachments use item type `"attachment"` with content type `"application/v
178178
Attachment placeholders are an experimental feature, the protocol is subject to change.
179179
</Alert>
180180
181-
Attachment placeholders use item type `"attachment"` with content type `"application/vnd.sentry.attachment-ref"`. A placeholder contains a **reference** to an attachment uploaded elsewhere — it does _not_ contain the actual attachment payload. The purpose is for the attachment to be handled (rate limited, filtered, etc.) together with the event payload, even if it was uploaded separately.
181+
Attachment placeholders use item type `"attachment"` with content type `"application/vnd.sentry.attachment-ref+json"`. A placeholder contains a **reference** to an attachment uploaded elsewhere — it does _not_ contain the actual attachment payload. The purpose is for the attachment to be handled (rate limited, filtered, etc.) together with the event payload, even if it was uploaded separately.
182182
183183
SDKs **SHOULD** send placeholders in the same envelope as the event the file is attached to.
184184
@@ -250,7 +250,7 @@ SDKs **SHOULD** send placeholders in the same envelope as the event the file is
250250
| Field | Type | Required | Description |
251251
|-------|------|----------|-------------|
252252
| `type` | String | **REQUIRED** | **MUST** be `"attachment"`. |
253-
| `content_type` | String | **REQUIRED** | **MUST** be `"application/vnd.sentry.attachment-ref"`. |
253+
| `content_type` | String | **REQUIRED** | **MUST** be `"application/vnd.sentry.attachment-ref+json"`. |
254254
| `length` | Integer | **REQUIRED** | Size of the placeholder payload in bytes. |
255255
| `attachment_length` | Integer | **REQUIRED** | Size of the referenced attachment in bytes. |
256256
| `filename` | String | **REQUIRED** | The name of the uploaded file without a path component. |
@@ -387,7 +387,7 @@ Hello World!
387387

388388
```
389389
{"event_id":"9ec79c33ec9942ab8353589fcb2e04dc"}
390-
{"type":"attachment","content_type":"application/vnd.sentry.attachment-ref","length":123,"attachment_length":212341234,"filename":"myfile.log"}
390+
{"type":"attachment","content_type":"application/vnd.sentry.attachment-ref+json","length":123,"attachment_length":212341234,"filename":"myfile.log"}
391391
{"location":"/api/42/upload/019c7a950dd376a1817a9ced5cb7c4b5/?length=212341234&signature=Zct1IMmM3BIJrzDOwG3tUn5AlrLhqIJFBu8Kd59dXCz","content_type":"text/plain"}
392392
```
393393

0 commit comments

Comments
 (0)