{{ message }}
feat(replay): Record segment names (transaction names) - #5763
Merged
Conversation
Co-Authored-By: Gino Buenaflor <giancarlo.buenaflor@sentry.io>
Contributor
📲 Install BuildsAndroid
|
Co-Authored-By: Gino Buenaflor <giancarlo.buenaflor@sentry.io>
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6b019b7 | 403.90 ms | 546.09 ms | 142.19 ms |
| e63ad34 | 310.20 ms | 366.84 ms | 56.63 ms |
| 5865051 | 319.74 ms | 365.60 ms | 45.86 ms |
| a1eadfa | 345.67 ms | 411.26 ms | 65.59 ms |
| b193867 | 319.59 ms | 403.09 ms | 83.50 ms |
| 0eaac1e | 316.82 ms | 357.34 ms | 40.52 ms |
| 22ff2c7 | 306.60 ms | 336.65 ms | 30.05 ms |
| d15471f | 286.65 ms | 314.68 ms | 28.03 ms |
| 05aa61d | 310.43 ms | 372.40 ms | 61.97 ms |
| fcec2f2 | 311.35 ms | 384.94 ms | 73.59 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6b019b7 | 0 B | 0 B | 0 B |
| e63ad34 | 0 B | 0 B | 0 B |
| 5865051 | 0 B | 0 B | 0 B |
| a1eadfa | 0 B | 0 B | 0 B |
| b193867 | 1.58 MiB | 2.19 MiB | 620.00 KiB |
| 0eaac1e | 1.58 MiB | 2.19 MiB | 619.17 KiB |
| 22ff2c7 | 0 B | 0 B | 0 B |
| d15471f | 1.58 MiB | 2.13 MiB | 559.54 KiB |
| 05aa61d | 0 B | 0 B | 0 B |
| fcec2f2 | 1.58 MiB | 2.12 MiB | 551.51 KiB |
Co-Authored-By: Gino Buenaflor <giancarlo.buenaflor@sentry.io>
buenaflor
marked this pull request as ready for review
July 15, 2026 11:31
buenaflor
requested review from
0xadam-brown,
markushi,
romtsn and
runningcode
as code owners
July 15, 2026 11:31
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for recording segment names (transaction names) in Session Replay so replay events can be queried by the named segment(s) that occurred during each replay segment.
Changes:
- Extend the
ReplayControllerAPI withregisterSegmentName, and register transaction names fromSentryClient.captureTransaction. - Persist segment names in
SentryReplayEventpayloads assegment_names(including serialization/deserialization support). - Track, deduplicate, cap (100), and clear segment names per replay segment in the Android replay capture strategies, with added tests.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
3 tasks
7 tasks
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.

Record transaction segment names on replay events so replays can be queried by the named transaction that occurred during each segment.
This is needed in Sentry Flutter to report segment names that occurred during replays. (getsentry/sentry-dart#3865)
Replay context
Adds
ReplayController.registerSegmentName, collects unique names alongside trace IDs with the same 100-value limit, and clears both collections when a replay segment is created. Successfully captured native transactions register their transaction name automatically.Payload
Replay events now serialize and deserialize the collected names as
segment_names, with coverage for protocol round trips, deduplication, limits, and per-segment clearing.Related work in Sentry Javascript getsentry/sentry-javascript#21851
Requested by Gino Buenaflor via Junior.
--
View Junior Session in Sentry