Repository navigation
Conversation
Add an optional `min_severity` (OTel severity_number, inclusive lower bound) to GET /api/logs and the MCP `query_logs` tool, and a severity select (any / debug+ / info+ / warn+ / error+ / fatal) next to the log filters in the UI. Logs without a severity are excluded when the filter is set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 15, 2026
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.
Closes #268.
What
GET /api/logstakes an optionalmin_severity— an inclusive lower bound on the OTelseverity_number(5 DEBUG, 9 INFO, 13 WARN, 17 ERROR, 21 FATAL). Rows with a NULL severity are excluded when it's set; omitting it keeps today's behavior.query_logsgets the samemin_severityarg (plumbed into the sharedapi::query_logs)..filters selectrule, so no new CSS.No migration: the query is already bounded by the time window (and
logs_service_time_idxwhen a service is set), so the severity predicate is just a row filter on top.Tests
logs_min_severity_filtersmoke test: inclusive floor (WARN → WARN+ERROR, ERROR → ERROR), composes withq, NULL-severity rows excluded only when filtering.cargo fmt --check,cargo clippy --all-targets -D warnings,cargo testagainst a local Postgres;npm run lint,npm test,npm run build.min_severity=9→ INFO+ERROR,min_severity=17→ ERROR only.(Side note:
rollup_vacuum_health_canary_…fails locally against a long-lived dev DB where autovacuum has already run — same onmain, unrelated to this change; it passes on a fresh DB like CI's.)🤖 Generated with Claude Code