Skip to content

fix(explore): Action menus not supporting numbers or booleans#116706

Open
nsdeschenes wants to merge 6 commits into
masterfrom
nd/fix-explore-attribute-tree-not-supporting-numbers
Open

fix(explore): Action menus not supporting numbers or booleans#116706
nsdeschenes wants to merge 6 commits into
masterfrom
nd/fix-explore-attribute-tree-not-supporting-numbers

Conversation

@nsdeschenes
Copy link
Copy Markdown
Contributor

@nsdeschenes nsdeschenes commented Jun 2, 2026

  • Attribute tree action menus (trace drawer, logs, metrics) now emit typed tag keys (tags[key,number], tags[key,boolean]) instead of raw attribute names when adding filters for
    number/float/boolean attributes
  • The explore search bar now recognizes typed tag keys via classifyTagKey fallback, so numeric operators (>, <, >=, <=) are available even when the attribute isn't in the pre-fetched
    tags collection
  • The spans table cell action menu now correctly shows "greater than" / "less than" actions for tags[key,number] columns instead of string-only "add to filter"

Closes EXP-980

Preserve the `type` field from `TraceItemResponseAttribute` in the
internal `Attribute` interface so downstream consumers can distinguish
number/boolean attributes from strings when building actions.
When actioning number/float attributes, wrap the key as
`tags[key,number]`; for booleans, `tags[key,boolean]`. This applies
to the trace drawer, metric, and log attribute tree actions so the
query builder receives properly typed filter keys.
Fall back to `classifyTagKey` when a key isn't in the pre-fetched tags
collection. This allows `tags[key,number]` keys to be recognized as
numeric fields, enabling comparison operators (>, <, >=, <=) in the
query builder.
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 2, 2026
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Jun 2, 2026

EXP-980

`decodeColumnOrder` now uses `classifyTagKey` to set the column type
for `tags[key,number]` and `tags[key,boolean]` fields. This ensures
the cell action menu shows numeric operators (greater/less than) for
number columns instead of string-only actions (add/exclude).
@nsdeschenes
Copy link
Copy Markdown
Contributor Author

@cursor review

@nsdeschenes nsdeschenes changed the title fix(explore): Attribute tree not supporting numbers or booleans fix(explore): Action menus not supporting numbers or booleans Jun 2, 2026
Known predefined fields like http.status_code should not be wrapped in
tags[key,type] syntax, since downstream lookups via getFieldDefinition
and field inclusion checks expect the canonical key name.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
@nsdeschenes
Copy link
Copy Markdown
Contributor Author

@cursor review

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 32d240f. Configure here.

@nsdeschenes nsdeschenes marked this pull request as ready for review June 2, 2026 18:37
@nsdeschenes nsdeschenes requested review from a team as code owners June 2, 2026 18:37
Comment thread static/app/views/performance/newTraceDetails/traceDrawer/details/utils.tsx Outdated
getFieldDefinition defaulted to 'event' type, missing span-specific
fields like http.decoded_response_content_length and
gen_ai.cost.total_tokens. These known fields were incorrectly wrapped
in tags[key,number] syntax, breaking filter actions in the trace drawer.
Comment thread static/app/views/explore/logs/useLogAttributesTreeActions.tsx
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