Repository navigation
feat(search-events): Track assisted query outcome for Seer translations - #1610
Merged
Merged
Conversation
When Seer's search agent translates a natural language query, report whether the executed query returned results via the `assisted_query.outcome` log and distribution metric, matching `trackAiQueryOutcome` in Sentry's frontend. The referrer is `assisted_query.mcp.<dataset>` (spans reported as traces), so the assisted query dashboard can count MCP alongside the search bar. Outcomes are `has_results`, `empty_results`, and `error_on_load`. Translation-time failures are already reported by Seer, and queries translated by the embedded agent are not tracked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1a007c4. Configure here.
…anslation Catch errors once around the whole search instead of per API call, so validation request failures and response shape errors also report error_on_load. Each run reports at most one outcome. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Match the frontend's trackAiQueryOutcome signature and body: dataset, mode, organization, resultCount, runId and error, with the referrer derived from the dataset, error reasons taken from the API detail, and the log sent through Sentry's logger. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use EventsApiDataset and normalizeEventsDataset for the AI query outcome dataset instead of a Seer-specific copy, and share an ExploreMode type for the Explore page's samples/aggregate mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry-outcome # Conflicts: # packages/mcp-core/src/tools/support/search-events/seer.ts
Keep coverage for the reported attributes, failures after translation, and skipping embedded agent queries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
skaasten
reviewed
Oct 23, 2026
| ...timeParams, | ||
| }); | ||
| // A series always has buckets, so count the ones with data. | ||
| trackSeerOutcome( |
Contributor
There was a problem hiding this comment.
I'm not clear on what's happening here - can we add a bit more explanation?
Contributor
Author
There was a problem hiding this comment.
If you request for a series like count(spans), you'll get a series back, but the data for each bucket might be all 0, which means no data.
skaasten
approved these changes
Oct 23, 2026
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.

When an MCP search tool uses Seer's search agent to turn a natural language question into a query, we now report whether that query returned anything once executed. This lets the assisted query dashboard count MCP alongside the Sentry search bar.
Seer only returns a query, so the frontend's
trackAiQueryOutcomenever sees MCP runs. The MCP runs the query itself, so it's the only place that knows the result.What's emitted
A new
trackAiQueryOutcomehelper sendsassisted_query.outcomeas a log and adistributionof the result count. It follows the same signature and body as the frontend'strackAiQueryOutcomeinstatic/app/components/searchQueryBuilder/askSeerCombobox/utils.ts(after getsentry/sentry#128561):outcome:has_results,empty_results, orerror_on_load(validation or Sentry API failure)referrer:assisted_query.mcp.<dataset>, with spans reported astracesdataset:spans,logs,errors, ortracemetrics(the frontend's names)mode,org_slug,run_id(sentry_run_id),conversation_url,code_mode,cross_event_enabled,error_reason(errors only)result_counton the log only, as the frontend doesApplies to
search_traces,search_logs,search_errors,search_metrics, andsearch_eventswith those datasets. For time series results, the count is the number of buckets with data.Not tracked
Notes
🤖 Generated with Claude Code