Skip to content

feat(explore): Support array attributes in logs and trace metrics search - #122484

Draft
manessaraj wants to merge 4 commits into
masterfrom
sarajmanes/explore-array-support-logs-tracemetrics
Draft

feat(explore): Support array attributes in logs and trace metrics search#122484
manessaraj wants to merge 4 commits into
masterfrom
sarajmanes/explore-array-support-logs-tracemetrics

Conversation

@manessaraj

@manessaraj manessaraj commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Array attribute support currently only surfaces in the spans search experience. This threads it into every logs and trace-metrics filter surface so array attributes appear in autocomplete, filter with the [*] membership operator, and work under has: — matching spans.

The shared plumbing (useTraceItemAttributes, useGetTraceItemAttributeKeys, useTraceItemSearchQueryBuilderProps, the array type badge) is already generic; these surfaces just never fetched/threaded the array collection.

Array attribute support was wired only into the spans search surface. Thread
arrayAttributes/arraySecondaryAliases through the logs and trace metrics search
query builders so array attributes surface in autocomplete, the [*] membership
operator, and has: — matching spans.

Surfaces updated:
- Logs: useLogsSearchQueryBuilderProps (+ logsTab, traceOurlogs, replay logs,
  ourlogs drawer)
- Trace metrics: metricToolbar Filter and cross-event metrics search bar

Gate every surface (spans included) on the same
organizations:trace-item-array-query-support flag that already gates the shared
attribute fetch, so array attributes never surface while the flag is off —
including via the validate endpoint, which classifies array columns regardless
of the flag.
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 24, 2026
The cross-event search bar (logs + spans) is a filter over attributes/tags, so
array attributes should be searchable there too. Fetch the 'array' collection
via useTraceItemDatasetAttributes and thread arrayAttributes/arraySecondaryAliases
into the builder, matching the cross-event metrics search bar.

Fetch-gated on organizations:trace-item-array-query-support (no validate/merge
path), so array attributes are empty when the flag is off.
Extend array attribute support to the remaining logs/trace-metrics filter
surfaces that fetch typed attribute collections: the dashboard widget-builder
search bars (logs + trace metrics, both the SearchBar and its data provider) and
the detector/alert search bars (trace search + metrics). Each fetches the
'array' collection and threads arrayAttributes/arraySecondaryAliases into the
builder.

All are filters over attributes/tags (not aggregation), so arrays apply. All are
fetch-gated on organizations:trace-item-array-query-support (no validate/merge
path). newTraceDetails/traceMetrics is left as-is: it hardcodes a minimal static
attribute set and relies on the dynamic tag-key fetch, which already surfaces
arrays.
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