WIP: Honor colorField when the marker field has format 'unique-string'#6068
Open
fqueze wants to merge 1 commit into
Open
WIP: Honor colorField when the marker field has format 'unique-string'#6068fqueze wants to merge 1 commit into
fqueze wants to merge 1 commit into
Conversation
The marker chart's colorField lookup read the field value directly from the payload, but for fields with format 'unique-string' the payload holds a string-table index rather than the string itself, so the value never matched a valid GraphColor and the marker fell back to blue. Add a getMarkerFieldValue helper in marker-schema.ts that dereferences unique-string / flow-id / terminating-flow-id field values through the string table, use it from MarkerChart Canvas, and collapse two existing inline copies of the same pattern (markerPayloadMatchesSearch and getGroupingValue) onto the helper. The console.warn calls in markerPayloadMatchesSearch that fired only for malformed profiles are dropped along the way.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6068 +/- ##
==========================================
- Coverage 83.81% 83.77% -0.05%
==========================================
Files 328 329 +1
Lines 34255 34550 +295
Branches 9572 9669 +97
==========================================
+ Hits 28712 28945 +233
- Misses 5115 5176 +61
- Partials 428 429 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
[note: this is a WIP because I haven't fully reviewed it. I think it's OK or mostly OK, so anybody can feel free to take it over the finish line. I'm submitting this as PR to have a deploy preview, and so I don't lose it, but I'm not actively working on this right now.]
The marker chart's colorField lookup read the field value directly from the payload, but for fields with format 'unique-string' the payload holds a string-table index rather than the string itself, so the value never matched a valid GraphColor and the marker fell back to blue.
Add a getMarkerFieldValue helper in marker-schema.ts that dereferences unique-string / flow-id / terminating-flow-id field values through the string table, use it from MarkerChart Canvas, and collapse two existing inline copies of the same pattern (markerPayloadMatchesSearch and getGroupingValue) onto the helper. The console.warn calls in markerPayloadMatchesSearch that fired only for malformed profiles are dropped along the way.