Skip to content

fix(dashboards): Prettify typed EAP attribute keys in group by - #120766

Draft
DominikB2014 wants to merge 1 commit into
masterfrom
dominikbuszowiecki/dain-1783-fix-custom-log-attribute-grouping-formatting-in-dashboards
Draft

fix(dashboards): Prettify typed EAP attribute keys in group by#120766
DominikB2014 wants to merge 1 commit into
masterfrom
dominikbuszowiecki/dain-1783-fix-custom-log-attribute-grouping-formatting-in-dashboards

Conversation

@DominikB2014

Copy link
Copy Markdown
Contributor

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] while name stays pretty (foo) — and group by options are keyed by FieldKind (measurement:, boolean:, tag:). The reverse lookup in getFieldOrTagOrMeasurementValue (static/app/views/discover/table/queryField.tsx) tried the field:, measurement:, span_op_breakdown:, equation:, and tag: prefixes but never boolean:. Numeric attributes resolved via the measurement: branch and rendered correctly, but booleans fell through to the unknown-tag fallback, which displays the raw tags[...] string.

Fix

When the stored field is an explicit typed key (tags[name,type]), classify it with the existing classifyTagKey util and look it up under the correct FieldKind prefix. 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.

@linear-code

linear-code Bot commented Jul 28, 2026

Copy link
Copy Markdown

DAIN-1783

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 28, 2026
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
DominikB2014 force-pushed the dominikbuszowiecki/dain-1783-fix-custom-log-attribute-grouping-formatting-in-dashboards branch from dc399c3 to 6d029db Compare July 28, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant