Skip to content
Merged
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
29 changes: 21 additions & 8 deletions develop-docs/sdk/telemetry/attachments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,27 @@ SDKs **SHOULD** send placeholders in the same envelope as the event the file is
**Workflow:**

1. If an attachment is larger than ~100 MiB, upload it to the [TUS](https://tus.io/protocols/resumable-upload#creation-with-upload)-conformant upload endpoint (requires feature `projects:relay-upload-endpoint`):
```shell
curl -X POST https://o0.ingest.sentry.io/api/0/upload/ \
--header "Tus-Resumable: 1.0.0" \
--header "Content-Type: application/offset+octet-stream" \
--header "Upload-Length: ${FILE_SIZE}" \
--data @myfile.log
```
2. Upon successful upload, attach a placeholder item to the event envelope, using the `Location` header from the upload response.
1. Create the upload:
```shell
curl -X POST https://o0.ingest.sentry.io/api/0/upload/ \
--header "Tus-Resumable: 1.0.0" \
--header "Upload-Length: ${FILE_SIZE}" \
```
1. Get the location response header:
Comment thread
tobias-wilfert marked this conversation as resolved.
Resolved
```
HTTP/1.1 201 Created
Location: https://o0.ingest.sentry.io/api/0/upload/24e533e02ec3bc40c387f1a0e460e216/
Tus-Resumable: 1.0.0
```
1. Upload the file:
```shell
curl -X PATCH https://o0.ingest.sentry.io/api/0/upload/24e533e02ec3bc40c387f1a0e460e216/ \
--header "Tus-Resumable: 1.0.0" \
--header "Content-Type: application/offset+octet-stream" \
--header "Upload-Offset: 0" \
--data @myfile.log
```
1. Upon successful upload, attach a placeholder item to the event envelope, using the `Location` header from the upload response.

</SpecSection>

Expand Down
Loading