feat(transactions): Preserve contexts, extra, and breadcrumbs - #6286
Draft
mjq wants to merge 2 commits into
Draft
Conversation
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 44c2e63. Configure here.
mjq
commented
Aug 4, 2026
Comment on lines
+69
to
+74
| /// The transaction event's `contexts`, serialized as a JSON string. | ||
| pub const SENTRY__TRANSACTION__CONTEXTS: &str = "sentry.transaction.contexts"; | ||
| /// The transaction event's `breadcrumbs`, serialized as a JSON string. | ||
| pub const SENTRY__TRANSACTION__BREADCRUMBS: &str = "sentry.transaction.breadcrumbs"; | ||
| /// The transaction event's `extra`, serialized as a JSON string. | ||
| pub const SENTRY__TRANSACTION__EXTRA: &str = "sentry.transaction.extra"; |
Member
Author
There was a problem hiding this comment.
Tempted to call these sentry.transaction.serialized_contexts or sentry.transaction.json_contexts (etc), just to make it even more explicit but idk.
Member
There was a problem hiding this comment.
I think we might want a more generic name sentry.event.extra that would give us the option to re-use the logic for other types of events (errors)
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.
The frontend is currently still relying on full transaction JSON from Nodestore to fetch transaction events' contexts, extras, and breadcrumbs in the span details pane of the trace waterfall.
A few important, defined keys in contexts are already extracted into attributes by Relay, but that does not cover custom keys or custom contexts, which are currently dropped. Extras (all custom) and breadcrumbs have no handling at all and are also dropped.
All of these features are deprecated: contexts and events have been replaced with attributes, and breadcrumbs have been replaced by logs. There is no need to make these legacy data sources searchable or have the same level of support as their replacements. Nonetheless, if a user of a transaction-based SDK sends this data, we don't want to just drop it.
Serialize contexts, extras, and breadcrumbs into JSON and store them as attributes. These attributes will be marked internal in Conventions so that they aren't displayed to users. Their only use will be on the span details pane of the trace waterfall, where they will be deserialized and shown the same way they currently are for
was_transaction: truespans.Note: I skipped serializing the
tracecontext, since this is already fully extracted to make the transaction span and therefore useless duplication.Fixes BROWSE-670.
I'll add the attribute names to conventions after we've confirmed the approach and names here on this draft, before merging.