Skip to content

feat(attributes): Add several measurement attributes#362

Open
loewenheim wants to merge 1 commit into
mainfrom
sebastian/measurement-attributes
Open

feat(attributes): Add several measurement attributes#362
loewenheim wants to merge 1 commit into
mainfrom
sebastian/measurement-attributes

Conversation

@loewenheim
Copy link
Copy Markdown
Contributor

Description

This adds the attributes

  • frames_frozen_rate
  • frames_slow_rate
  • stall_total_time
  • stall_percentage

These 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

  • I have run yarn test and verified that the tests pass.
  • I have run yarn generate to generate and format code and docs.

If an attribute was added:

  • The attribute is in a namespace (e.g. nextjs.function_id, not function_id)
  • I have used the correct value for pii (i.e. maybe or true. Use false only for values that should never be scrubbed such as IDs)

@loewenheim loewenheim requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners May 12, 2026 11:15
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 12, 2026

INGEST-909

@github-actions
Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Add several measurement attributes by loewenheim in #362
  • Add calculated performance scores by loewenheim in #355
  • Add rpc.response.status_code attribute by alexander-alderman-webb in #352
  • Add rpc.method attribute by alexander-alderman-webb in #351
  • Add app vitals start attributes by buenaflor in #353
  • Add process.runtime.engine.* attributes by chargome in #347

Bug Fixes 🐛

  • (attributes) Change several deprecation statuses to normalize to align with ingestion paths by constantinius in #350
  • (create) Replace angle brackets in file names by loewenheim in #356

Internal Changes 🔧

  • (gh) Remove myself from CODEOWNERS by lcian in #354
  • Bump vulnerable js packages by chargome in #359

🤖 This preview updates automatically when you update the PR.

@loewenheim loewenheim self-assigned this May 12, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7a0b3e4. Configure here.

Copy link
Copy Markdown
Contributor

@buenaflor buenaflor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a specific field for that yet but imo for now we should add in the brief that this is expected to be computed in relay

#320

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.

2 participants