feat(measurements): Add attribute field#388
Merged
Merged
Conversation
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.
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Attributes
Other
Bug Fixes 🐛Attributes
Other
Internal Changes 🔧Deps
Other
🤖 This preview updates automatically when you update the PR. |
5 tasks
Lms24
approved these changes
May 19, 2026
Member
Lms24
left a comment
There was a problem hiding this comment.
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?
Dav1dde
approved these changes
May 19, 2026
Contributor
Author
We'll make the remaining changes in Relay itself. Currently it doesn't use measurements at all. |
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.
Description
This adds an optional field
"attribute"of typestringto 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
yarn testand verified that the tests pass.yarn generateto generate and format code and docs.