Repository navigation
Description
Problem
On 2026-10-08 the owner asked for SRE / Service Performance & Logs (k8s/monitoring/dashboards/sre-service.json, uid devops-sre-service) to show two log panels: warnings and higher on top, and every line below it, as today.
Today's layout.
- Row 11, Service Logs & Live Stream (
sre-service.json:918, y=38), holds a single logs panel: id 12, Live Service Logs (Loki) (:935, h=12 w=24 x=0 y=39). - Its query is
{namespace=~"$namespace", pod=~"$pod"}(:952). Its description says it covers the "selected service and pods" (:928), but choosing a service does not narrow it (see Key questions). - Row 18 follows at y=51 (
:967), then flamegraphs 19 and 20 at y=52 and y=64. - The dashboard refreshes every 10 s (
:1035) and opens on the last hour (:1170).
Most of the hour's warnings never reach the panel.
- The Loki datasource returns at most 1,000 lines per query (
k8s/monitoring/grafana-values.yaml:64,maxLines: 1000). The provisioned datasource showed the same on 2026-10-08, and panel 12 sets no other limit. - On 2026-10-08, namespace
devopslogged 4,069 lines in 1 h. 85 of them (about 2%) were warnings or errors. - So panel 12 holds only the newest ~1,000 lines, roughly the last 15 minutes. It never fetches warning-or-higher lines older than that, and the ones it does fetch are mixed in with info lines.
Which level key, checked live on 2026-10-08 (Loki 3.6.11, Grafana 12.3.1).
- Loki adds
detected_levelto every line as structured metadata. This comes fromdiscover_log_levels, which Loki's 3.6 configuration reference lists underlimits_configwith defaulttrue. The documented values are trace, debug, info, warn, error, critical and fatal.k8s/logging/loki-values.yamldoes not set it, and the live/configshows it on. - Pod lines get a lower-case value normalized from their JSON or logfmt
levelfield: JSONWARNINGbecomeswarn, andERRORbecomeserror. - Kubernetes event lines already carry an indexed
levellabel, which Loki copies unchanged (Info,Warning). - Pod-log streams have no indexed
levellabel. - Over the 6 h to 2026-10-08 00:30 UTC, across all namespaces, the only values were
Info,Warning,debug,error,info,unknownandwarn.
The candidate filter works.
sum by (detected_level) (count_over_time({namespace="devops"} | detected_level=~"(?i)(warn|warning|error|err|critical|fatal|panic)" [1h]))returnedWarning26,error49 andwarn10. It returned noinfo,Infoorunknownlines.- The same regex without
(?i)returned onlyerrorandwarn. It dropped the 26 Kubernetes Warning events. - Loki's
/loki/api/v1/format_queryaccepts the expression. With a malformed regex in the same position it returns400 invalid-query.
Choosing a pod blanks the logs panel today.
- Pod-log streams carry
podonly as structured metadata.{namespace="devops", job="devops/service"}has nopodlabel name, and each line carriespodin its metadata. - A stream selector matches only indexed labels. With one pod chosen,
{namespace=~"devops", pod=~"<pod>"}counted 0 lines over 1 h, while{namespace=~"devops"} | pod=~"<pod>"counted 2,612. - With "All" selected, both forms count the same 4,026 pod lines and 43 event lines, because
$pod's custom all value is.*(sre-service.json:1140). - A new panel that copied today's selector would have the same defect.
What the tests check.
tests/test_grafana_dashboards.py:196lints every shipped dashboard. It checks that panel ids are unique (src/devops_cli/grafana/linter.py:40), that panels stay inside the 24-column grid (:54), that refIds are unique, and that no query is empty.- The overlap check skips rows (
linter.py:71), so lint would catch a flamegraph left overlapping a moved panel but not row 18 left at y=51. :475requiressre-service.jsonto lint with zero errors and zero warnings.:567pins the flamegraphs' titles and widths, but not their y.- The linter skips every non-Prometheus target (
linter.py:112), so no dashboard test parses the dashboard's LogQL. parse_logql_query(src/devops_cli/k8s/logql.py:152) is a lenient extractor for the CLI's log commands. It accepts| detected_level=~"[bad"without error, so it is not a validator. None of the dependencies is a LogQL or Loki library.test_loki_deletes_logs_once_they_are_thirty_days_old(tests/test_k8s.py:1320) already pins the Lokilimits_configvalues the stack relies on.tests/test_k8s_monitoring_dashboards.py:125caps each generated ConfigMap at 262,144 bytes.grafana-stack-dashboardsis about 182 KB today.
Acceptance criteria
-
Row 11 holds two full-width logs panels on the
lokidatasource, both with panel 12's options:- Top: a new panel with an unused id (21), titled Warnings & Errors (Loki), at h=8 x=0 y=39.
- Its query is
{namespace=~"$namespace"} | pod=~"$pod" | detected_level=~"(?i)(warn|warning|error|err|critical|fatal|panic)". - Its description says it lists the lines Loki detects as warning or higher for the selected namespace and pods, including Kubernetes Warning events.
- Its query is
- Below: panel 12, Live Service Logs (Loki), at y=47 with h=12.
- Its query is
{namespace=~"$namespace"} | pod=~"$pod". - Its description says it covers the selected namespace and pods, with no mention of a service.
- Its query is
- Top: a new panel with an unused id (21), titled Warnings & Errors (Loki), at h=8 x=0 y=39.
-
Row 18 moves to y=59, and flamegraphs 19 and 20 move to y=60 and y=72.
- Beyond the new panel, these y values, the two queries and the two descriptions, nothing else in the file changes.
uv run devops grafana dashboards lint k8s/monitoring/dashboards/sre-service.jsonreports no errors or warnings.
-
k8s/logging/loki-values.yamlsetsdiscover_log_levels: trueunderloki.limits_config, with a comment naming the Warnings & Errors (Loki) panel that depends on it. A file-only test asserts the setting. It sits next totest_loki_deletes_logs_once_they_are_thirty_days_old(tests/test_k8s.py:1320at 910b823, or wherever test(cli): every test file sits in the directory mirroring the package it tests or in tests/invariants/, and the root conftest holds only the hermetic floor #1313 has moved it). -
A test reads
sre-service.json. It sits next to the existingsre-service.jsonchecks (tests/test_grafana_dashboards.pyat 910b823, or wherever test(cli): every test file sits in the directory mirroring the package it tests or in tests/invariants/, and the root conftest holds only the hermetic floor #1313 has moved it). It asserts:- the (id, type, title, gridPos) of row 11, the two log panels and row 18, from top to bottom;
- each log panel's datasource uid and expr;
- the gridPos of flamegraphs 19 and 20;
- that the new panel's options equal panel 12's;
- that the top query is the lower query plus the level filter.
In review, each of these mutations must make it fail:
- putting
pod=~"$pod"back inside the stream selector; - dropping
(?i); - swapping the two log panels' y;
- leaving row 18 at y=51.
-
k8s/README.md:170gives the dashboard its real title, SRE / Service Performance & Logs, and lists both log panels. -
Tests read files only and never reach the network or run helm. Each new test's call phase stays under 1 s, and
uv run devops cipasses within its 5-minute budget. -
uv run devops pr check-readinesspasses. -
Pending a person, after merge and Argo CD's sync of
monitoring(the Grafana sidecar then reloadsgrafana-stack-dashboards). The Loki values line restates the live default, so it needs no live check of its own.- Open the dashboard with namespace
devops, pod "All", over the last hour. The lower panel lists every line, as before. - Open the top panel in Explore (panel menu > Explore) over a fixed one-hour range that ended at least 5 minutes ago:
- The logs-volume histogram shows only warn, warning and error levels (critical or fatal if present), never info, debug or unknown.
- Explore's line-limit note reports as many lines returned as the sum of the values from
sum by (detected_level) (count_over_time({namespace="devops"} | detected_level=~"(?i)(warn|warning|error|err|critical|fatal|panic)" [1h])), run over the same range.
- Find a pod that has warning-or-higher lines with
sum by (pod) (count_over_time({namespace="devops"} | detected_level=~"(?i)(warn|warning|error|err|critical|fatal|panic)" [1h])), and choose it.- Both panels show only that pod's lines, and the top panel is not empty.
- The lower panel is not empty for any pod that has logs in the range.
- Open the dashboard with namespace
Key questions
- Filter on the indexed
levellabel instead ofdetected_level? Proposed: no.- Pod-log streams have no
levellabel. Only Kubernetes event streams have one, and so do node journals, which have no namespace. - Loki sets
detected_levelon every line, from the line's level or severity field or from an existinglevellabel. - That depends on
discover_log_levels. If it were off, the top panel would show "No data", which reads as "no warnings", and a one-time live check would not notice a later chart or Loki change. So this item pins it inloki-values.yamlwith a test, as the retention limits already are.
- Pod-log streams have no
- Use the logs panel's own controls instead of a second panel? Proposed: no.
- Grafana 12's logs visualization has a Show controls option (
showControls) that adds a log-level filter. That filter runs in the browser over the at most 1,000 lines already fetched, about 15 minutes here. It is a viewer-side filter, not part of the panel's query. - Enable infinite scrolling fetches older lines only as a viewer scrolls.
- The owner asked to see warnings and all logs at once, and a LogQL label filter fetches every warning-or-higher line in the range.
- Grafana 12's logs visualization has a Show controls option (
- Is case-insensitive matching needed? Proposed: yes.
- Loki lower-cases levels it parses from lines, but it copies an existing
levellabel unchanged, so Kubernetes events arrive asWarning. Without(?i), the 26 Warning events indevopswere dropped. criticalandfatalare documented Loki values.errandpanicnever appeared live, but they come from the requested query and cost nothing.
- Loki lower-cases levels it parses from lines, but it copies an existing
- Should Kubernetes Warning events appear in the top panel? Proposed: yes.
- They are the namespace's warnings, for example an image pull back-off on 2026-10-07, and the all-logs panel already shows them.
- They carry the object's name, not
pod, so they drop out when one pod is chosen.
- Is moving
pod=~"$pod"out of the stream selector in scope? Proposed: yes.- This item writes both queries anyway, and otherwise the new panel would ship with today's blank-on-selection defect.
- With "All" the result is identical (verified above).
- The move touches only these two queries; no other panel changes.
- Should choosing a service narrow the log panels? Proposed: not here.
- Because
$pod's custom all value is.*, a chosen service with pod "All" still matches the whole namespace. This affects every panel that filters by$pod: 11 of the 14 non-row panels. The heatmap and the two flamegraphs filter by$servicedirectly. $serviceiskube_pod_info'screated_by_name, which for a Deployment is a ReplicaSet name. feat(k8s): profiles come from k8s-monitoring's profiling feature for every workload, and the profiling dashboards list what is profiled #1134 found the same for the flamegraphs.- Fixing the variables changes every
$podpanel, so it belongs in its own item. That is why panel 12's description drops "service" here instead.
- Because
- Will the top panel be useful in the
loggingnamespace? Proposed: yes. It surfaces that namespace's current noise, and no filter for it is added here.- Loki logs a warn and an error line for each cache-generation lookup (
deletion is not available for this tenant), about 58k of each over the 6 h to 2026-10-08 00:30 UTC. fix(k8s): chart defaults stop writing logs and watches nobody reads (loki canary and per-query delete warnings, pyroscope debug logging, grafana's datasource sidecar), and loki admits only grafana and alloy from monitoring #1133 removes this, and until it lands the new panel's queries add their own pairs on each refresh. - The leftover Fluent Bit release logs Kubernetes API connection errors. fix(k8s): pod logs reach loki once and labelled, with alloy as the only shipper (remove fluent-bit) #548 removed it from the repo, and refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128 assigns its one-time deletion to a person, or to an agent that shows a diff first.
- Loki logs a warn and an error line for each cache-generation lookup (
- Bind the new panel to
${loki_datasource}? Proposed: no. It should match panel 12's fixedlokiuid. Every Prometheus panel likewise uses the fixedprometheusuid, and nothing references thedatasourceorloki_datasourcevariables. Switching to them is a dashboard-wide change. - Do other dashboards need the same split? Proposed: no. Of the 14 dashboards in
k8s/monitoring/dashboards, onlysre-service.jsonhas a logs panel or any Loki target. feat(telemetry): send devops-cli logs with trace ids to Loki #813 plans a separate devops-cli error-stream panel. - How is the LogQL checked without the network? Proposed: the test asserts the exact query text. The expression was proven live on 2026-10-08 with
count_over_timeand Loki'sformat_query. Turningparse_logql_queryinto a validator would mean a new hand-rolled parser.
Strategic alignment
- P2 feature: the owner requested it on 2026-10-08.
- With the datasource's 1,000-line limit, panel 12 reaches back only about 15 minutes of the
devopsnamespace's hour. Warnings and errors are about 2% of that namespace's lines, so most of them are never fetched, and the rest are mixed in with info lines. - The same edit also fixes the pod selection that blanks the logs panel today.
- With the datasource's 1,000-line limit, panel 12 reaches back only about 15 minutes of the
- Value: medium (triage starts from every problem line in the range, and the pod filter works). Effort: XS (one dashboard file, one Loki values line, two file-only tests, one README row).
- Library-first: uses Loki's own level detection (
detected_level, pinned at its default), a LogQL label filter, and the existing dashboard linter and its tests. It adds no new parser or helper. - Related:
- feat(k8s): profiles come from k8s-monitoring's profiling feature for every workload, and the profiling dashboards list what is profiled #1134 rewrites the selectors of flamegraph panels 19 and 20 in the same file so they stop using
created_by_name; this item only moves their y. - fix(telemetry): grafana aggregate lines sum and average the lines shown, read as dashed reference lines, and reach calls in flight #970 edits panels 7 and 8 in the same file.
- fix(k8s): chart defaults stop writing logs and watches nobody reads (loki canary and per-query delete warnings, pyroscope debug logging, grafana's datasource sidecar), and loki admits only grafana and alloy from monitoring #1133 removes Loki's per-query deletion error. It also edits
loki-values.yaml'slimits_configand the Loki values test, so whichever merges second rebases. - refactor(k8s): the monitoring stack runs on k8s-monitoring and chart features, with no duplicate collection, dead defaults or leftovers #1128 and fix(k8s): pod logs reach loki once and labelled, with alloy as the only shipper (remove fluent-bit) #548 cover the Fluent Bit removal.
- feat(telemetry): send devops-cli logs with trace ids to Loki #813 plans a devops-cli error-stream panel; this item covers only
sre-service.json. - test(cli): every test file sits in the directory mirroring the package it tests or in tests/invariants/, and the root conftest holds only the hermetic floor #1313 and test(cli): Convert ratchets to bans and merge invariant tests #1336 move and merge the test files named above.
- feat(k8s): profiles come from k8s-monitoring's profiling feature for every workload, and the profiling dashboards list what is profiled #1134 rewrites the selectors of flamegraph panels 19 and 20 in the same file so they stop using
Alternatives check of 2026-11-01: covers.
Tool: grafana/grafana (https://github.com/grafana/grafana), AGPL-3.0, last activity 2026-10-31, maintained.
Proposed design
Problem statement
The SRE service dashboard shows only the newest 1,000 log lines in one panel. Most warning and error lines in the time range are never fetched. Choosing a pod blanks the panel because the pod filter sits in the stream selector. This item adds a warnings-and-errors panel above the all-logs panel, fixes the pod filter, and pins the Loki setting that enables level detection.
Acceptance criteria
Requirement: Two log panels in row 11
Row 11 SHALL hold two full-width logs panels on the loki datasource, with the top panel (id 21) at h=8 x=0 y=39 and the lower panel (id 12) at h=12 x=0 y=47.
Scenario: Read dashboard JSON
- WHEN The test reads sre-service.json and inspects the panels in row 11
- THEN Panel 21 has gridPos {h:8, w:24, x:0, y:39} and panel 12 has gridPos {h:12, w:24, x:0, y:47}, both with datasource uid 'loki' and type 'logs'
Requirement: Top panel query and description
The top panel SHALL use the query {namespace="$namespace"} | pod="$pod" | detected_level=~"(?i)(warn|warning|error|err|critical|fatal|panic)" and its description SHALL mention namespace, pods, and Kubernetes Warning events.
Scenario: Verify top panel expr
- WHEN The test reads the expr field of panel 21's target and its description
- THEN The expr equals the lower panel's expr plus the level filter, and the description contains 'namespace', 'pods', and 'Kubernetes Warning events'
Requirement: Lower panel query and description
The lower panel SHALL use the query {namespace="$namespace"} | pod="$pod" and its description SHALL mention namespace and pods with no mention of a service.
Scenario: Verify lower panel expr
- WHEN The test reads the expr field of panel 12's target and its description
- THEN The expr is {namespace=
"$namespace"} | pod="$pod" and the description does not contain the word 'service'
Requirement: Row 18 and flamegraph positions
Row 18 SHALL be at y=59, flamegraph 19 at y=60, and flamegraph 20 at y=72.
Scenario: Verify moved panels
- WHEN The test reads the gridPos of panels 18, 19, and 20
- THEN Panel 18 has y=59, panel 19 has y=60, and panel 20 has y=72
Requirement: Loki discover_log_levels pinned
k8s/logging/loki-values.yaml SHALL set discover_log_levels: true under loki.limits_config with a comment naming the Warnings & Errors (Loki) panel.
Scenario: Verify Loki values
- WHEN The test reads loki-values.yaml and checks the limits_config section
- THEN The key discover_log_levels has value true under loki.limits_config and the comment names the panel
Requirement: Dashboard structure test with mutation detection
A test SHALL assert the gridPos, datasource uid, expr, options equality, and query relationship of the log panels and flamegraphs, and SHALL fail on each listed mutation.
Scenario: Mutation detection
- WHEN The test applies mutations: pod back in selector, drop (?i), swap the two log panels' y, or leave row 18 at y=51
- THEN Each mutation causes the test to fail
Requirement: README dashboard entry
k8s/README.md SHALL give the dashboard its real title 'SRE / Service Performance & Logs' and list both log panels.
Scenario: Verify README
- WHEN The test reads k8s/README.md at the dashboard entry
- THEN The title is 'SRE / Service Performance & Logs' and both panel names appear
Requirement: File-only tests and CI budget
All new tests SHALL read files only, never reach the network, and each new test's call phase SHALL stay under 1 second.
Scenario: CI passes within budget
- WHEN uv run devops ci completes
- THEN All checks pass within the 5-minute budget and no test makes a network call or runs helm
Existing Tool Considered
Grafana (https://github.com/grafana/grafana) covers the logs panel type on a Loki datasource, LogQL stream selectors and label filters including detected_level and pod filters, panel datasource binding, and dashboard layout with multiple full-width panels. It lacks nothing to the capability itself; the work is authoring the dashboard JSON in the repo and pinning Loki's discover_log_levels, which are configuration steps, not a missing tool.
Key questions
- Does Grafana cover the need, and should the item be kept?: Keep the item. Grafana covers the logs panel, LogQL filters, and layout. The work is authoring the dashboard JSON and pinning Loki's discover_log_levels, which are configuration steps in this repository, not a missing tool. (a person decides)
- Filter on the indexed level label instead of detected_level?: No. Pod-log streams have no level label. Only Kubernetes event streams have one. Loki sets detected_level on every line from the line's level field or an existing level label. This depends on discover_log_levels, so this item pins it in loki-values.yaml with a test. (best practice) [sources: k8s/logging/loki-values.yaml, k8s/monitoring/dashboards/sre-service.json]
- Rejected: Filter on indexed level label. Rejected. Pod-log streams have no level label. Only Kubernetes event streams have one, and node journals have no namespace.
- Chosen: Filter on detected_level. Chosen. Loki sets detected_level on every line. It covers pod logs and Kubernetes events. Pin discover_log_levels to prevent silent loss.
- Use the logs panel's own controls instead of a second panel?: No. Grafana 12's log-level filter runs in the browser over the at most 1,000 lines already fetched, about 15 minutes here. The owner asked to see warnings and all logs at once, and a LogQL label filter fetches every warning-or-higher line in the range. (best practice) [sources: k8s/monitoring/grafana-values.yaml]
- Rejected: Browser-side log-level filter (showControls). Rejected. It filters only the 1,000 lines already fetched, about 15 minutes of data. It is a viewer-side filter, not part of the panel's query.
- Chosen: Second panel with LogQL level filter. Chosen. A LogQL label filter fetches every warning-or-higher line in the range from the server side.
- Is case-insensitive matching needed?: Yes. Loki lower-cases levels it parses from lines, but it copies an existing level label unchanged, so Kubernetes events arrive as Warning. Without (?i), the 26 Warning events in devops were dropped. critical and fatal are documented Loki values. err and panic never appeared live but cost nothing. (best practice) [sources: k8s/monitoring/dashboards/sre-service.json]
- Rejected: Case-sensitive regex. Rejected. Drops Kubernetes Warning events (26 in devops over 1 h).
- Chosen: Case-insensitive regex (?i). Chosen. Catches Warning, warn, error, err, critical, fatal, and panic regardless of case.
- Should Kubernetes Warning events appear in the top panel?: Yes. They are the namespace's warnings, for example an image pull back-off. The all-logs panel already shows them. They carry the object's name, not pod, so they drop out when one pod is chosen. (best practice) [sources: k8s/monitoring/dashboards/sre-service.json]
- Rejected: Exclude Kubernetes events. Rejected. They are the namespace's warnings and the all-logs panel already shows them.
- Chosen: Include Kubernetes events. Chosen. They are warnings for the namespace. They drop out naturally when a specific pod is chosen.
- Is moving pod=~"$pod" out of the stream selector in scope?: Yes. This item writes both queries anyway, and otherwise the new panel would ship with the blank-on-selection defect. With All the result is identical. The move touches only these two queries. (best practice) [sources: k8s/monitoring/dashboards/sre-service.json]
- Rejected: Keep pod in stream selector. Rejected. Pod-log streams carry pod only as structured metadata. A stream selector matches only indexed labels, so one pod chosen counts 0 lines.
- Chosen: Move pod to a LogQL filter. Chosen. | pod=~"$pod" matches structured metadata. With All the result is identical. Fixes the blank-on-selection defect.
- Should choosing a service narrow the log panels?: Not here. Because $pod's custom all value is .*, a chosen service with pod All still matches the whole namespace. This affects 11 of the 14 non-row panels. Fixing the variables changes every $pod panel, so it belongs in its own item. Panel 12's description drops 'service' here instead. (best practice) [sources: k8s/monitoring/dashboards/sre-service.json]
- Rejected: Fix service narrowing here. Rejected. It affects 11 of 14 non-row panels and changes every $pod panel. It belongs in its own item.
- Chosen: Defer to a separate item. Chosen. This item drops 'service' from the description and leaves the variable behavior unchanged.
- Will the top panel be useful in the logging namespace?: Yes. It surfaces that namespace's current noise, and no filter for it is added here. Loki logs a warn and an error line for each cache-generation lookup, about 58k of each over 6 hours. fix(k8s): chart defaults stop writing logs and watches nobody reads (loki canary and per-query delete warnings, pyroscope debug logging, grafana's datasource sidecar), and loki admits only grafana and alloy from monitoring #1133 removes this. (best practice) [sources: k8s/logging/loki-values.yaml]
- Rejected: Add a namespace filter for logging. Rejected. fix(k8s): chart defaults stop writing logs and watches nobody reads (loki canary and per-query delete warnings, pyroscope debug logging, grafana's datasource sidecar), and loki admits only grafana and alloy from monitoring #1133 removes the noise source. Adding a filter here would be a one-time workaround.
- Chosen: No special filter. Chosen. The panel surfaces the noise, which is useful for triage. fix(k8s): chart defaults stop writing logs and watches nobody reads (loki canary and per-query delete warnings, pyroscope debug logging, grafana's datasource sidecar), and loki admits only grafana and alloy from monitoring #1133 removes the source.
- Bind the new panel to ${loki_datasource}?: No. It should match panel 12's fixed loki uid. Every Prometheus panel likewise uses the fixed prometheus uid, and nothing references the datasource or loki_datasource variables. Switching to them is a dashboard-wide change. (best practice) [sources: k8s/monitoring/dashboards/sre-service.json]
- Rejected: Use ${loki_datasource} variable. Rejected. Nothing references the variable. Switching is a dashboard-wide change.
- Chosen: Use fixed loki uid. Chosen. Matches panel 12 and every Prometheus panel's fixed prometheus uid.
- Do other dashboards need the same split?: No. Of the 14 dashboards in k8s/monitoring/dashboards, only sre-service.json has a logs panel or any Loki target. feat(telemetry): send devops-cli logs with trace ids to Loki #813 plans a separate devops-cli error-stream panel. (best practice) [sources: k8s/monitoring/dashboards/sre-service.json]
- Rejected: Apply to all dashboards. Rejected. Only sre-service.json has a logs panel or any Loki target.
- Chosen: Apply only to sre-service.json. Chosen. It is the only dashboard with a Loki target. feat(telemetry): send devops-cli logs with trace ids to Loki #813 covers the devops-cli panel separately.
- How is the LogQL checked without the network?: The test asserts the exact query text. The expression was proven live on 2026-10-08 with count_over_time and Loki's format_query. Turning parse_logql_query into a validator would mean a new hand-rolled parser. (best practice) [sources: src/devops_cli/k8s/logql.py]
- Rejected: Build a LogQL validator. Rejected. parse_logql_query is a lenient extractor, not a validator. A new hand-rolled parser adds maintenance cost.
- Chosen: Assert exact query text in the test. Chosen. The expression was proven live. The test reads the file and checks the string. No network needed.
Open questions
- Does Grafana cover the need, and should the item be kept? (a person decides)
- The alternatives check found that
https://github.com/grafana/grafanacovers this item. Adopt the tool, or keep the item and give the reason. (a person decides)
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNew
- StatusShow more project fieldsNew
Activity
dan-petty-bot commentedon Oct 8, 2026
Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.
It improves SRE dashboard usability and fixes a broken pod filter, but it is a monitoring-view enhancement, not a production-availability or data-loss issue.SREs get a dedicated warnings/errors view and a working pod filter, reducing time to spot regressions in service logs.Requires adding a new Loki panel with a level-filter query, reordering rows, switching the pod selector from a label match to a line-filter, and keeping the existing linter and pin tests green.dan-petty commentedon Oct 26, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
This change improves user experience on a critical monitoring dashboard, but it is not urgent.The change enhances visibility of warnings and errors for service logs, which is important for operational efficiency.Implementing the log panel changes requires moderate development effort to modify the dashboard layout and queries.dan-petty commentedon Oct 28, 2026
Refine cannot set this item to Ready at 0b76871 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
levellabel. Only Kubernetes event streams have one, and so do node journals, which have no namespace.detected_levelon every line, from the line's level or severity field or from an existinglevellabel.discover_log_levels. If it were off, the top panel would show "No data", which reads as "no warnings", and a one-time live check would not notice a later chart or Loki change. So this item pins it inloki-values.yamlwith a test, as the retention limits already are.showControls) that adds a log-level filter. That filter runs in the browser over the at most 1,000 lines already fetched, about 15 minutes here. It is a viewer-side filter, not part of the panel's query.levellabel unchanged, so Kubernetes events arrive asWarning. Without(?i), the 26 Warning events indevopswere dropped.criticalandfatalare documented Loki values.errandpanicnever appeared live, but they come from the requested query and cost nothing.pod, so they drop out when one pod is chosen.$pod's custom all value is.*, a chosen service with pod "All" still matches the whole namespace. This affects every panel that filters by$pod: 11 of the 14 non-row panels. The heatmap and the two flamegraphs filter by$servicedirectly.$serviceiskube_pod_info'screated_by_name, which for a Deployment is a ReplicaSet name. feat(k8s): profiles come from k8s-monitoring's profiling feature for every workload, and the profiling dashboards list what is profiled #1134 found the same for the flamegraphs.$podpanel, so it belongs in its own item. That is why panel 12's description drops "service" here instead.deletion is not available for this tenant), about 58k of each over the 6 h to 2026-10-08 00:30 UTC. fix(k8s): chart defaults stop writing logs and watches nobody reads (loki canary and per-query delete warnings, pyroscope debug logging, grafana's datasource sidecar), and loki admits only grafana and alloy from monitoring #1133 removes this, and until it lands the new panel's queries add their own pairs on each refresh.devops-cli-service commentedon Nov 1, 2026
Alternatives check: covers
Tool: grafana/grafana (https://github.com/grafana/grafana)
Covers:
detected_level=~"(?i)(...)"and| pod=~"$pod"filters the issue needsLacks:
discover_log_levels, which are configuration steps, not a missing toolSources:
Checked on 2026-11-01. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 1, 2026
Refine cannot set this item to Ready at e093ac8 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
https://github.com/grafana/grafanacovers this item. Adopt the tool, or keep the item and give the reason. (a person decides)[-]feat(k8s): the sre service dashboard shows warnings and errors in a log panel above all logs, and choosing a pod narrows both[/-][+]feat(k8s): Add warnings and errors above logs, narrow both by pod[/+]dan-petty commentedon Nov 6, 2026
The job shortened the title of this item. The summary had 114 characters, and the limit is 60. The type and the scope stay.
feat(k8s): the sre service dashboard shows warnings and errors in a log panel above all logs, and choosing a pod narrows bothfeat(k8s): Add warnings and errors above logs, narrow both by poddevops-cli-service commentedon Nov 7, 2026
Released in v0.77.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.77.0
devops-cli-service commentedon Nov 7, 2026
Live since 2026-11-07 05:06 UTC