feat(explore): Validate spans search attributes#118015
Open
nsdeschenes wants to merge 13 commits into
Open
Conversation
Fetch validation results for the spans tab search query and use them to keep known valid dynamic attributes searchable while warning on invalid keys. Extract the filter key registry setup so trace item builders and the provider share the same metadata cache. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Add coverage for spans search validation query options, request handling, and propagation of valid and invalid validation keys through the search query builder. Co-Authored-By: OpenAI Codex <noreply@openai.com>
…/feat-explore-validate-query-builder # Conflicts: # static/app/components/performance/spanSearchQueryBuilder.tsx # static/app/views/explore/spans/spansTabSearchSection.spec.tsx # static/app/views/explore/spans/spansTabSearchSection.tsx
Update the frontend validation schema to mirror the nested query response from the validate endpoint. Read validated query fields from the nested fields array so custom span query attributes continue to populate search suggestions. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Remove the unsupported-filter override from trace item search builder props. Keep dynamic tag key suggestions available without forcing unsupported filters to be rejected. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Restore the trace item query builder override so unsupported filters are disallowed when async tag keys are unavailable. Keep the test coverage that asserts async key support allows unsupported filters. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Pass invalidFilterKeys into query parsing and annotate matching filter tokens with the same invalid state used for unsupported keys. Add parser coverage so invalid keys make the query invalid. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Render invalidFilterKeys with the invalid token state instead of warning state so their visual treatment matches invalid parsed filters. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Match aggregate filter keys with their arguments when applying validation results so invalid function filters are marked invalid in the query builder. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Contributor
Author
|
@sentry review |
Contributor
Author
|
@cursor review |
Keep previous span validation results while a new validate request is loading so invalid filter highlighting does not briefly disappear between query keys. Parse validation error responses in the shared query options so invalid validation details are cached as data and can be reused as placeholder data. Co-Authored-By: OpenAI Codex <noreply@example.com>
Contributor
Author
|
@cursor review |
Contributor
Author
|
@sentry review |
Contributor
There was a problem hiding this comment.
✅ 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 aa07043. Configure here.
Keep the validation schema private since only the inferred data type is used outside the module. Co-Authored-By: OpenAI Codex <noreply@openai.com>
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.
The spans tab now validates the active search query through the events validation endpoint and feeds the result back into the search query builder. Valid dynamic attributes discovered by validation are added to the local filter key set, while invalid validated keys are highlighted as warnings in the query builder.
The shared async filter-key registry setup now lives in a hook so trace item builders and the generic search query builder provider use the same cache behavior. Tests cover the validation query options, hook error handling, and propagation of valid and invalid keys through the builder props.
Refs EXP-1008