fix(eap): Correctly normalize attributes with placeholders#6012
Merged
loewenheim merged 6 commits intoMay 22, 2026
Conversation
loewenheim
commented
May 20, 2026
| // The other cases would mean that either the original attribute contains a placeholder | ||
| // and the replacement doesn't, or vice versa. This is ruled out by a compile-time check | ||
| // in `relay-conventions`. | ||
| _ => unreachable!(), |
Contributor
Author
There was a problem hiding this comment.
To be extra safe we could also make the function fallible and have it return None in this case.
Comment on lines
-420
to
+428
| "browser.web_vital.cls.source.<key>": { | ||
| "browser.web_vital.cls.source.1": { | ||
| "type": "string", | ||
| "value": "AppContainer > NavContent > MobileTopbar > StyledButton", | ||
| }, | ||
| "browser.web_vital.cls.source.2": { | ||
| "type": "string", | ||
| "value": "div.app-1azrk9k.etjky0h0 > AppContainer > BodyContainer > BaseFooter", | ||
| }, | ||
| "browser.web_vital.cls.source.3": {"type": "string", "value": "<unknown>"}, |
Contributor
Author
There was a problem hiding this comment.
The previous snapshot for this test was absolute nonsense. We were trying to backfill each of cls.source.{1,2,3} to browser.web_vital.cls.source.<key> and only the first backfill succeeded.
Dav1dde
approved these changes
May 21, 2026
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.
This implements correct normalization (backfilling/replacement) for attributes containing placeholders. Currently, there is only one attribute in
sentry-conventionswhich contains a placeholder and has normalization enabled:cls.source.<key>->browser.web_vital.cls.source.<key>. This PR makes it so thatcls.source.foobaris backfilled tobrowser.web_vital.cls.source.foobar.It also puts a compile-time check in
relay-conventionsthat ensures that we don't attempt to normalize between attributes that do and don't have placeholders (cases which we definitely can't handle without specifying what should happen insentry-conventions).Fixes #5982. Fixes RELAY-241.