Skip to content

fix(cli): Keep regex log queries intact in --query - #1407

Draft
JoshuaKGoldberg wants to merge 2 commits into
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-asfrom
joshgoldberg/logs-1031-keep-regex-log-queries-intact-in-the-sentry-cli
Draft

JoshuaKGoldberg wants to merge 2 commits into
joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-asfrom
joshgoldberg/logs-1031-keep-regex-log-queries-intact-in-the-sentry-cli

Conversation

@JoshuaKGoldberg

Copy link
Copy Markdown
Member

The CLI's query sanitizer now passes key://pattern// regex log filters through byte-for-byte instead of rewriting commas, boolean operators, and whitespace inside the pattern. The CLI docs and agent skill also gain a regex example and a don't-quote-it note.

Closes LOGS-1031

@linear-code

linear-code Bot commented Oct 5, 2026

Copy link
Copy Markdown

LOGS-1031

@JoshuaKGoldberg
JoshuaKGoldberg force-pushed the joshgoldberg/logs-1031-keep-regex-log-queries-intact-in-the-sentry-cli branch from c560771 to 61301cb Compare October 5, 2026 16:38
@JoshuaKGoldberg
JoshuaKGoldberg changed the base branch from main to joshgoldberg/logs-1015-pass-regex-log-queries-through-sentry-mcps-search-tools-as October 5, 2026 16:38
@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
JoshuaKGoldberg force-pushed the joshgoldberg/logs-1031-keep-regex-log-queries-intact-in-the-sentry-cli branch from 61301cb to b71ce0c Compare October 5, 2026 16:42
JoshuaKGoldberg and others added 2 commits October 5, 2026 14:17
Parse `key://pattern//` (and `!key://pattern//`) as a single opaque
filter, ending at the first `//` followed by whitespace, `)`, or end
of query, so sanitizeQuery no longer rewrites commas, brackets,
`OR`/`AND`, or repeated whitespace inside a pattern. Document regex
search in the syntax reference and the CLI skill docs for logs.

Refs LOGS-1031

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sentry accepts tags[k,string], tags[k:sub], flags[...], quoted, and [*]
keys before a regex value, so --query now preserves regexes on those keys
instead of normalizing or rewriting inside the pattern.

Refs LOGS-1031
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JoshuaKGoldberg
JoshuaKGoldberg force-pushed the joshgoldberg/logs-1031-keep-regex-log-queries-intact-in-the-sentry-cli branch from b71ce0c to 12a56db 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 (outdated) deployment
Actions — 61301cb7 Deployed Oct 5, 2026 by JoshuaKGoldberg via eval #1188
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