fix(dashboards): Prettify typed EAP attribute keys in group by - #120766
Draft
DominikB2014 wants to merge 1 commit into
Draft
Conversation
Boolean custom attributes are stored with an explicit type, e.g. tags[foo,boolean], and their group by options are keyed by FieldKind (boolean:tags[foo,boolean]). The reverse lookup in getFieldOrTagOrMeasurementValue never tried the boolean: prefix, so the field fell through to the unknown-tag fallback and rendered the raw tags[foo,boolean] string instead of the prettified name. Classify the typed key to find the matching option. Numeric attributes already resolved via the measurement: branch; this extends the same handling to boolean (and string) typed keys. DAIN-1783
DominikB2014
force-pushed
the
dominikbuszowiecki/dain-1783-fix-custom-log-attribute-grouping-formatting-in-dashboards
branch
from
July 28, 2026 19:02
dc399c3 to
6d029db
Compare
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.
Grouping by a custom boolean attribute in the dashboard widget query builder rendered the raw
tags[attribute_name,boolean]string (with the type suffix) instead of the prettified attribute name. This was visible on logs widgets.Root cause
EAP attributes are stored with an explicit type key — the backend returns
key = tags[foo,boolean]whilenamestays pretty (foo) — and group by options are keyed byFieldKind(measurement:,boolean:,tag:). The reverse lookup ingetFieldOrTagOrMeasurementValue(static/app/views/discover/table/queryField.tsx) tried thefield:,measurement:,span_op_breakdown:,equation:, andtag:prefixes but neverboolean:. Numeric attributes resolved via themeasurement:branch and rendered correctly, but booleans fell through to the unknown-tag fallback, which displays the rawtags[...]string.Fix
When the stored field is an explicit typed key (
tags[name,type]), classify it with the existingclassifyTagKeyutil and look it up under the correctFieldKindprefix. The change is additive (only matches an option that already exists) and lives in the shared query field component, so it covers logs, spans, trace-metrics, and preprod group by.Fixes DAIN-1783.