Skip to content

feat(chunk): Add attachments to profile chunks#670

Draft
markushi wants to merge 1 commit into
mainfrom
feat/raw-profile-support
Draft

feat(chunk): Add attachments to profile chunks#670
markushi wants to merge 1 commit into
mainfrom
feat/raw-profile-support

Conversation

@markushi

@markushi markushi commented Jun 14, 2026

Copy link
Copy Markdown
Member

Profile chunks can now carry a generic attachments list referencing files stored in the object store — e.g. a raw perfetto trace kept alongside the Sentry-processed chunk. Each entry has a name, an optional content_type, and a stored_id pointing at the stored object:

"attachments": [
  {
    "name": "raw_profile", 
    "content_type": "application/x-perfetto", 
    "stored_id": "aef123345"
  }
]

The field is exposed on the chunk read path (GetAttachments()) and serialized into the /chunks response. When chunks are merged, the merged chunk collects the attachments of all merged chunks into its own attachments list (skipping entries without a stored_id); the per-chunk and merged representations share the same shape.

Attachments are a sample-v2-only concept: they are dropped on legacy Android-format chunks (no version field), where GetAttachments() returns nil. The field is omitted from serialized JSON when empty, so existing stored chunks and old payloads are unaffected.

This is the Go read-path half of the cross-repo feature; the writer (sentry, via vroomrs) stamps the references onto the chunk, and the message contract lives in sentry-kafka-schemas. Companion vroomrs change: getsentry/vroomrs#92.

Note for reviewers: attachment entries on a merged chunk follow merge order and are not individually attributable to a source chunk — acceptable for the current use case.

Profile chunks can now carry a generic `attachments` list referencing
files stored in the object store, e.g. a raw perfetto trace kept
alongside the processed chunk. Each entry has a `name`, an optional
`content_type`, and a `stored_id` pointing at the stored object.

Attachments are supported on sample v2 chunks only; they are dropped on
legacy Android-format chunks. When merging chunks, the merged chunk
collects the attachments of all merged chunks into its own list, skipping
entries without a stored_id.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant