feat(tus): add Upload-Metadata header to TUS requests#1795
Merged
Conversation
Add the `Upload-Metadata` header to TUS creation (POST) and upload
(PATCH) requests in the `sentry <base64({"attachment_type":"<type>"})>`
format that the relay server expects for preliminary quota checks.
|
JoshuaMoelans
approved these changes
Jun 5, 2026
1 task
JoshuaMoelans
added a commit
to getsentry/sentry
that referenced
this pull request
Jul 1, 2026
…16963) We offer previews of attachments, but for large files these can slow down or even freeze a page (see below). Since we are introducing large file attachments (e.g., this [sentry-native PR](getsentry/sentry-native#1795)), trying to preview files up to 1GiB seems too ambitious for a browser window. We could do the same thing we do for certain attachment types (like minidumps, binary files, ...) and disable the preview button as such: <img width="1073" height="188" alt="Screenshot 2026-06-05 at 11 57 48" src="https://github.com/user-attachments/assets/9bdec060-0388-4a68-a5e1-50de363b4c18" /> TBD: currently set the `MAX_TEXT_PREVIEW_SIZE` to 20MiB, not sure if this is an appropriate value? Currently it is based on the recommended `max_attachment_size` set in some SDKs (defaults to 20MiB), and text fields of this size and below render decently fast (~3s). --- For example, from [a 199MiB attachment](https://sentry-sdks.sentry.io/issues/7529263714/events/1e2089d5f58146eb82ecb78a2930baf8/?project=4509371203256320): <img width="673" height="261" alt="Screenshot 2026-06-05 at 13 53 02" src="https://github.com/user-attachments/assets/f6f3af72-0740-40bb-a88b-12c22fc03b0e" /> [Link to events with different sized attachments](https://sentry-sdks.sentry.io/issues/7529263714/events/ef22d84b6981437181572e3d23ed74c6/events/?project=4509371203256320) (20-199MiB) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add metadata header to TUS creation (POST) and upload (PATCH) requests:
Testing:
https://sentry-sdks.sentry.io/issues/7528989067
See also: