Repository navigation
fix(search-events): Report the query's timestamp bounds as the time range - #2466
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
…ange Structured searches that skip the embedded agent (explicit dataset, fields and sort) sent only statsPeriod, even when the query named an absolute window with timestamp:>= / timestamp:< bounds. The results were bounded by the query, but the executed search reported "Last 7d" with start/end null. Agent-translated searches over the same window reported start/end, so the same window was described two ways. Narrow the period to the query's top-level timestamp bounds on this path, as the agent path already does with the agent's range. Grouped or boolean queries are left as they are.
|
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.
Fixes #2465.
A structured search with an explicit dataset, fields and sort skips the embedded agent. On that path the handler sent only
statsPeriod, even when the query named an absolute window withtimestamp:>=/timestamp:<. Sentry still applied the bounds in the query, so the results were right. But the executed search said "Time range: Last 7d", and the structured result hadstart/endnull.The same window through the agent path reports
start/end, because the agent moves the bounds intotimeRange. A caller reproducing an alert window got samples that said one window and aggregates that said another.Change
On the no-agent path, the period is narrowed to the query's top-level
timestamp:bounds. This reuses the overlap logic the agent path already applies to the agent's range (renamednarrowPeriodToAgentRange→narrowPeriodToRange, since it now takes either range). The bounds stay in the query, and they only narrow the period, so the rows don't change. A lower bound with no upper bound runs until now. Bounds that aren't absolute ISO timestamps with aZor an offset are ignored. Boolean or grouped queries are left alone, because a bound inside a group doesn't bound the whole search.Overlap with #2139: that draft adds a
QUOTED_VALUE_PATTERNconstant with the same name and regex tosearch.ts. Whichever PR lands second should reuse the other's.via automation
evt_905b9c478746fd9deeb853f85ad7441b· Run IDdispatch_b2d88ec2d0f24acdeb3743666e8717ab.--
View Session [Sentry]