feat(chunk): Add attachments to profile chunks#92
Draft
markushi wants to merge 1 commit into
Draft
Conversation
Add a generic `attachments` list to profile chunks, exposed through the Python API (`get_attachments` / `set_attachments` and a new `Attachment` class). Each attachment has a `name`, an optional `content_type`, and a `stored_id` referencing an object in the object store, e.g. a raw perfetto trace stored alongside the processed chunk. Attachments are supported on sample v2 chunks only: the getter returns an empty list and the setter is a no-op on legacy Android-format chunks. `set_attachments` replaces the whole list, keeping it idempotent on consumer retries. Also route android profiles that carry a version through sample-format detection, so android sample v2 chunks are no longer misrouted to the legacy Android format. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jun 14, 2026
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.
Adds a generic
attachmentslist to profile chunks, exposed through the Python API. Each attachment references a file stored in the object store — e.g. a raw perfetto trace kept alongside the Sentry-processed chunk — with aname, an optionalcontent_type, and astored_id:New
Attachmentpyclass plusget_attachments/set_attachmentsonProfileChunk, with matching.pyistubs. The references survivecompress()→decompress_profile_chunk(), i.e. they persist into the stored chunk representation (covered by a test mirroring the sentry writer flow).Design notes for reviewers:
set_attachmentsreplaces the whole list rather than appending, so it stays idempotent if the processing task retries.versionthrough sample-format detection (from_json_vec_and_platform→ version-based dispatch), so android sample-v2 chunks are no longer misrouted to the legacy Android format. This is required for android sample-v2 chunks to support attachments at all.This is the writer/in-process half of the cross-repo feature; the Go read path lives in getsentry/vroom#670 and the kafka message contract in sentry-kafka-schemas. Needs a vroomrs release + pin bump in sentry once it lands.