fix(eap): Use correct attribute names in normalize_mobile_attributes#6065
Open
loewenheim wants to merge 2 commits into
Open
fix(eap): Use correct attribute names in normalize_mobile_attributes#6065loewenheim wants to merge 2 commits into
normalize_mobile_attributes#6065loewenheim wants to merge 2 commits into
Conversation
loewenheim
commented
Jun 9, 2026
Comment on lines
-54
to
+63
| if let Some(value) = attrs.get_value("app_start_cold").and_then(|v| v.as_f64()) | ||
| if let Some(value) = attrs | ||
| .get_value(APP__VITALS__START__COLD__VALUE) | ||
| .and_then(|v| v.as_f64()) | ||
| && value <= MAX_DURATION_MOBILE_MS | ||
| { | ||
| attrs.insert(APP__VITALS__START__VALUE, value); | ||
| attrs.insert_if_missing(APP__VITALS__START__TYPE, || "cold".to_owned()); | ||
| } else if let Some(value) = attrs.get_value("app_start_warm").and_then(|v| v.as_f64()) | ||
| } else if let Some(value) = attrs | ||
| .get_value(APP__VITALS__START__WARM__VALUE) | ||
| .and_then(|v| v.as_f64()) |
Contributor
Author
There was a problem hiding this comment.
This is the functional change in this PR.
Comment on lines
-1549
to
1552
| if event.measurement("app_start_cold").is_some() { | ||
| if event.measurement(APP_START_COLD).is_some() { | ||
| Some("cold") | ||
| } else if event.measurement("app_start_warm").is_some() { | ||
| } else if event.measurement(APP_START_WARM).is_some() { | ||
| Some("warm") |
Comment on lines
-1426
to
+1427
| ("app_start_cold", Some("cold")), | ||
| ("app_start_warm", Some("warm")), | ||
| (APP_START_COLD, Some("cold")), | ||
| (APP_START_WARM, Some("warm")), |
Contributor
Author
There was a problem hiding this comment.
The change I'm making in this file would've caught the bug.
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.
When we implemented #6007, we neglected to adjust the function
normalize_mobile_attributesto the correct attribute names. This means that for standalone V2 spans, and V1 spans going through the experimental V2 standalone span pipeline, this function was essentially nonfunctional.Before this PR:
app_start_coldgets "smartly" turned into attributeapp.vitals.start.cold.value->normalize_mobile_attributeslooks for attributeapp_start_coldand doesn't find it 👎app_start_coldgets backfilled toapp.vitals.start.cold.value, so:app_start_cold: the function looks forapp_start_coldand finds it 👍app.vitals.start.cold.value: the function looks forapp_start_coldand doesn't find it 👎After this PR:
app_start_coldgets "smartly" turned into attributeapp.vitals.start.cold.value->normalize_mobile_attributeslooks for attributeapp.vitals.start.cold.valueand finds it 👍app_start_coldgets backfilled toapp.vitals.start.cold.value, so:app_start_cold: the function looks forapp.vitals.start.cold.valueand finds it 👍app.vitals.start.cold.value: the function looks forapp.vitals.start.cold.valueand finds it 👍ref: INGEST-943