Repository navigation
fix(search-events): Say when the agent changes explicit fields - #2489
Draft
sentry-junior[bot] wants to merge 1 commit into
Draft
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
With a natural-language query, the embedded agent's fields replace the caller's explicit fields, and the result did not say so. A caller that asked for count() on metrics got a table grouped by a column it never requested, and could only spot it by diffing executedSearch.fields. Add a note listing the requested and executed fields whenever they differ as sets.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Contributor
📊 MCP Server Token Cost ReportSummary
Per-Tool Breakdown
Note: This measures the static overhead of tool definitions sent to LLM clients with every request. Lower is better. MCP Apps viewsEach
The budget applies to raw bytes, and the view's generator fails over it. |
This branch was successfully deployed
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.
With a natural-language
query,resolveEventFieldslets the embedded agent's fields replace the caller's explicitfields(explicit fields are only trusted for structured queries). The result didn't say so. Onsearch_metrics,fields: ["count()"]ran as["user.geo.region", "count(value)"], withexplanation: nulland no note, so the caller got a different table than it asked for.This adds a note to the result whenever the executed fields differ from the explicit fields as a set:
The note covers every agent-backed search tool (
search_errors,search_logs,search_traces,search_metrics,search_profiles,search_events). It skips replays and calls where no translator ran. A reorder alone doesn't trigger it.It doesn't change which fields run. Part of this rewrite was right:
count()is rejected ondataset=tracemetrics("Invalid number of arguments for count"). Follow-ups are in the issue: metrics-specificfields/sortexamples, and whether the agent should add group-bys the caller didn't request.Refs #2488
via automation
evt_905b9c478746fd9deeb853f85ad7441b· Run IDdispatch_129dbbf0f351ff55397a9b4bf63d0ae4.--
View Session [Sentry]