Skip to content

fix(search): Pass regex log queries through as written - #1409

Draft
JoshuaKGoldberg wants to merge 2 commits into
joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-searchfrom
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as
Draft

JoshuaKGoldberg wants to merge 2 commits into
joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-searchfrom
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as

Conversation

@JoshuaKGoldberg

Copy link
Copy Markdown
Member

The search tools now recognize key://pattern// regex log filters as Sentry search syntax, so a regex query runs as written instead of being treated as natural language and rewritten. Rewriting a regex into a wildcard now counts as a filter downgrade, and the search_logs description mentions the syntax.

Closes LOGS-1015

@linear-code

linear-code Bot commented Oct 5, 2026

Copy link
Copy Markdown

LOGS-1015

@JoshuaKGoldberg
JoshuaKGoldberg changed the base branch from main to joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-search October 5, 2026 16:32
@JoshuaKGoldberg
JoshuaKGoldberg force-pushed the joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as branch from f62e4c8 to 7277c79 Compare October 5, 2026 16:32
@JoshuaKGoldberg
JoshuaKGoldberg force-pushed the joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as branch from 7277c79 to 80ba22e Compare October 5, 2026 16:42
JoshuaKGoldberg and others added 2 commits October 5, 2026 14:17
Recognize `key://pattern//` regex filters as Sentry search syntax so
regex-only log queries are no longer treated as natural language and
replaced by Seer or embedded-agent rewrites. Treat a regex rewritten into
a plain or wildcard filter as a downgrade, keep regex values with spaces
or apostrophes as one token, and mention regex syntax in search_logs.

Refs LOGS-1015
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sentry only runs key://pattern// as a regex on logs; other datasets match
the literal text, so a regex sent to search_spans or search_errors now
lets the agent's rewrite through instead of forcing an empty search.

Refs LOGS-1015
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JoshuaKGoldberg
JoshuaKGoldberg force-pushed the joshgoldberg/logs-1014-teach-sentry-mcps-search-agent-regex-log-search branch from f5c77bf to 5bbb4b0 Compare October 5, 2026 18:17
@JoshuaKGoldberg
JoshuaKGoldberg force-pushed the joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as branch from 80ba22e to d801aab Compare October 5, 2026 18:17

This branch was successfully deployed

1 active deployment
Actions — d801aab3 Deployed Oct 5, 2026 by JoshuaKGoldberg via eval #1197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant