Skip to content

feat(measurements): Add attribute field#388

Merged
loewenheim merged 2 commits into
mainfrom
sebastian/measurement-schema
May 19, 2026
Merged

feat(measurements): Add attribute field#388
loewenheim merged 2 commits into
mainfrom
sebastian/measurement-schema

Conversation

@loewenheim
Copy link
Copy Markdown
Contributor

@loewenheim loewenheim commented May 19, 2026

Description

This adds an optional field "attribute" of type string to the measurements schema. This field is meant to contain the name of the attribute corresponding to this measurement, if any. All existing measurements with corresponding attributes have also had this field filled in.

It also tests that if an attribute is set for a measurement, that attribute exists and does not have a replacement. The intention is that if a measurement's current attribute gets deprecated in favor of a new one, the measurement should be updated to point to the replacement attribute.

The purpose of this change is primarily to allow Relay to be smarter when converting measurements to attributes.

Closes #386. Closes CON-94.

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.

This adds an optional field `"attribute"` of type `string` to the
measurements schema. This field is meant to contain the name of the
attribute corresponding to this measurement, if any. All existing
measurements with corresponding attributes have also had this field
filled in.

It also tests that if an attribute is set for a measurement, that
attribute exists and does not have a replacement. The intention is that if
a measurement's current attribute gets deprecated in favor of a new one,
the measurement should be updated to point to the replacement attribute.

The purpose of this change is primarily to allow Relay to be smarter
when converting measurements to attributes.
@loewenheim loewenheim requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners May 19, 2026 08:37
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 19, 2026

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 gcp.function.context.* span attributes by chargome in #371
  • Add sentry.dsc.project_id as an attribute by constantinius in #358
  • Add trpc.* attributes by chargome in #370
  • Add angular.version attribute by chargome in #367
  • Add aws.lambda.* and aws.cloudwatch.logs.* attributes by chargome in #369
  • Add react.version attribute by chargome in #368
  • Add state.type attribute by chargome in #365
  • Add cloud.* span attributes by chargome in #364
  • 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

Other

  • (measurements) Add attribute field by loewenheim in #388

Bug Fixes 🐛

Attributes

  • Correct PR references in attribute changelogs by chargome in #384
  • Increase some PII values by loewenheim in #373
  • Change several deprecation statuses to normalize to align with ingestion paths by constantinius in #350

Other

  • (create) Replace angle brackets in file names by loewenheim in #356

Internal Changes 🔧

Deps

  • Bump astro from 6.1.6 to 6.1.10 by dependabot in #374
  • Bump svelte from 5.53.5 to 5.55.7 by dependabot in #381

Other

  • (gh) Remove myself from CODEOWNERS by lcian in #354
  • Bump vulnerable pytest by alexander-alderman-webb in #360
  • Bump vulnerable js packages by chargome in #359

🤖 This preview updates automatically when you update the PR.

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 19, 2026

CON-94

Copy link
Copy Markdown
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Nice, thanks! FYI, I'm currently working on adding a docs page for measurements so that we can surface them better. For Relay, do you need anything in terms of code generation for measurements?

@loewenheim
Copy link
Copy Markdown
Contributor Author

For Relay, do you need anything in terms of code generation for measurements?

We'll make the remaining changes in Relay itself. Currently it doesn't use measurements at all.

@loewenheim loewenheim merged commit 10c3bd0 into main May 19, 2026
15 checks passed
@loewenheim loewenheim deleted the sebastian/measurement-schema branch May 19, 2026 08:58
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.

Allow declaring replacement attribute names in measurements

3 participants