From 19755fad81c996a6b69a350bafaeef2501410ef4 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2026 17:14:14 +0000 Subject: [PATCH 1/2] feat(search-events): Use Seer translation outside experimental mode Seer natural-language translation for search_events was gated behind experimental sessions. Drop that gate so any organization with the gen-ai-search-agent-translate feature (and AI features not hidden) gets Seer translation, falling back to the embedded agent as before. Co-Authored-By: Shaun Kaasten --- docs/specs/search-events.md | 2 +- .../src/tools/catalog/search-events.test.ts | 22 ------------------- .../src/tools/support/search-events/search.ts | 1 - 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/docs/specs/search-events.md b/docs/specs/search-events.md index 8f9e283ac..9a8b61962 100644 --- a/docs/specs/search-events.md +++ b/docs/specs/search-events.md @@ -143,7 +143,7 @@ Requests for a metric over time ("per hour", "per day", "trend", "over time") re - **Logs timestamp handling**: Logs don't support query-based timestamp filters like `timestamp:-1h`. Instead, use `statsPeriod=24h` parameter - **Project ID mapping**: API requires numeric project IDs, not slugs. Tool automatically converts project slugs to IDs -- **Seer opt-in**: Seer translation runs only in experimental sessions (`--experimental` for stdio or `/mcp?experimental=1` for HTTP), when the organization has the required Seer features. Default sessions use the configured embedded agent for natural-language translation; if Seer is unavailable in an experimental session, the tool falls back to that agent. +- **Seer translation**: Seer translates natural-language queries when the organization has the required Seer features and AI features are not hidden. If Seer is unavailable or cannot translate the query, the tool falls back to the configured embedded agent. - **Seer cross-event filters**: Time series results do not apply cross-event filters. When Seer returns those filters for a time series, the response always begins with a warning identifying the omitted filters and the broader results, even when `includeExplanation` is false. - **Seer project scope**: For a successful Seer translation without `projectSlug`, search and Explorer links use `project=-1` to match the all-accessible-project scope sent to Seer. Other unscoped searches retain their existing default scope. - **Parallel attribute fetching**: For spans/logs/metrics, fetches both string and number attribute types in parallel for better performance diff --git a/packages/mcp-core/src/tools/catalog/search-events.test.ts b/packages/mcp-core/src/tools/catalog/search-events.test.ts index 7de937048..683ba068b 100644 --- a/packages/mcp-core/src/tools/catalog/search-events.test.ts +++ b/packages/mcp-core/src/tools/catalog/search-events.test.ts @@ -3406,7 +3406,6 @@ describe("search_events", () => { }, accessToken: "test-token", userId: "1", - experimentalMode: true, }; const seerQuery = { query: "span.op:http.client", @@ -3471,27 +3470,6 @@ describe("search_events", () => { ); }); - it("uses the embedded agent without experimental opt-in", async () => { - mockGenerateText.mockResolvedValueOnce( - mockAIResponse("spans", "span.op:http.client"), - ); - mswServer.use( - mockOrganization(["gen-ai-search-agent-translate"]), - http.get("https://sentry.io/api/0/organizations/test-org/events/", () => - HttpResponse.json({ data: [] }), - ), - ); - - const result = await searchEvents.handler(seerParams, { - ...context, - experimentalMode: undefined, - }); - - expect(mockSeerStart).not.toHaveBeenCalled(); - expect(mockGenerateText).toHaveBeenCalled(); - expect(result).not.toContain("Translated by Seer's search agent."); - }); - it("should translate natural language queries with Seer", async () => { mswServer.use( mockOrganization(["gen-ai-search-agent-translate"]), diff --git a/packages/mcp-core/src/tools/support/search-events/search.ts b/packages/mcp-core/src/tools/support/search-events/search.ts index 3879ccf45..9925d3cf9 100644 --- a/packages/mcp-core/src/tools/support/search-events/search.ts +++ b/packages/mcp-core/src/tools/support/search-events/search.ts @@ -661,7 +661,6 @@ export async function runSearchEvents( // preserves. Like the UI, an explicit environment is added to Seer's query // afterwards. const seerTranslation = - context.experimentalMode && params.query && isSeerSearchDataset(params.dataset) && !hasStructuredQuery && From 1717f42f2c602204435cd1270da72181781ba2a1 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Mon, 5 Oct 2026 17:47:15 +0000 Subject: [PATCH 2/2] docs(search-events): Clarify Seer AI features requirement --- docs/specs/search-events.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/search-events.md b/docs/specs/search-events.md index 9a8b61962..2020b3049 100644 --- a/docs/specs/search-events.md +++ b/docs/specs/search-events.md @@ -143,7 +143,7 @@ Requests for a metric over time ("per hour", "per day", "trend", "over time") re - **Logs timestamp handling**: Logs don't support query-based timestamp filters like `timestamp:-1h`. Instead, use `statsPeriod=24h` parameter - **Project ID mapping**: API requires numeric project IDs, not slugs. Tool automatically converts project slugs to IDs -- **Seer translation**: Seer translates natural-language queries when the organization has the required Seer features and AI features are not hidden. If Seer is unavailable or cannot translate the query, the tool falls back to the configured embedded agent. +- **Seer translation**: Seer translates natural-language queries when the organization has the required Seer features and AI features are enabled. If Seer is unavailable or cannot translate the query, the tool falls back to the configured embedded agent. - **Seer cross-event filters**: Time series results do not apply cross-event filters. When Seer returns those filters for a time series, the response always begins with a warning identifying the omitted filters and the broader results, even when `includeExplanation` is false. - **Seer project scope**: For a successful Seer translation without `projectSlug`, search and Explorer links use `project=-1` to match the all-accessible-project scope sent to Seer. Other unscoped searches retain their existing default scope. - **Parallel attribute fetching**: For spans/logs/metrics, fetches both string and number attribute types in parallel for better performance