feat(explore): Support array attributes in logs and trace metrics search - #122484
Draft
manessaraj wants to merge 4 commits into
Draft
feat(explore): Support array attributes in logs and trace metrics search#122484manessaraj wants to merge 4 commits into
manessaraj wants to merge 4 commits into
Conversation
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.
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.
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.
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 underhas:— matching spans.The shared plumbing (
useTraceItemAttributes,useGetTraceItemAttributeKeys,useTraceItemSearchQueryBuilderProps, the array type badge) is already generic; these surfaces just never fetched/threaded thearraycollection.