feat(attributes): Add several measurement attributes#362
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7a0b3e4. Configure here.
| { | ||
| "key": "stall_total_time", | ||
| "brief": "The combined duration of all stalls in milliseconds. Only applies to React Native.", | ||
| "type": "integer", |
There was a problem hiding this comment.
stall_total_time type should be double, not integer
High Severity
stall_total_time is typed as integer, but real-world values from the React Native SDK have sub-millisecond precision (e.g., 247.875). All other time-duration measurements in this repo (time_to_full_display, fcp, ttfb, etc.) use double. Using integer here will truncate fractional millisecond values when Relay converts measurements to attributes, causing silent data loss.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 7a0b3e4. Configure here.


Description
This adds the attributes
frames_frozen_rateframes_slow_ratestall_total_timestall_percentageThese attributes are the equivalents of measurements accessed/computed by Relay in https://github.com/getsentry/relay/blob/2061055ea0e7a82266ba4c90205c416daa04875d/relay-event-normalization/src/event.rs#L1094-L1145. Defining them as attributes is a prerequisite to running the same computation for V2 spans.
This PR intentionally doesn't put the attributes under their "proper" names (I don't know in all cases what those would be, but I know that they wouldn't be this). This is because Relay converts measurements to attributes 1-to-1, so to preserve parity between V1 and V2 spans, we want to reuse the names. Renaming the attributes can later be accomplished through the normal deprecation process.
ref: INGEST-909
PR Checklist
yarn testand verified that the tests pass.yarn generateto generate and format code and docs.If an attribute was added:
nextjs.function_id, notfunction_id)pii(i.e.maybeortrue. Usefalseonly for values that should never be scrubbed such as IDs)