Skip to content

fix(monitoring): RoadmapServiceGitHubWritesHigh counts a request with no method label as a write, so it fired on 341 reads #2574

Description

@dan-petty

Problem Description

RoadmapServiceGitHubWritesHigh (group roadmap-service-activity, k8s/monitoring/prometheus-values.yaml, #2475) selects the writes with a negative matcher: devops_cli_github_requests_total{job="roadmap-service", method!="GET", resource!="graphql"}. In PromQL, method!="GET" also matches a series that has no method label, because an absent label reads as the empty string. So every request of a series without the label counts as a write.

On 2026-10-29 at 00:28 UTC the rule fired with 341 "writes". That was every GitHub request of the hour: the running pod was built before #2475, so none of its series had a method label (count by (method) (...) gave one series for core and one for graphql, both without method). The same false alert comes back for any source of the counter that does not set method, such as a cluster Job built from an older image.

Reproduction Steps

  1. Keep a devops_cli_github_requests_total{job="roadmap-service", resource="core"} series with no method label and more than 300 requests in an hour.
  2. Evaluate the rule.
  3. It fires, although the series holds no write.

Expected vs Actual Behavior

Expected: the rule counts only the write methods, with a positive matcher: method=~"POST|PUT|PATCH|DELETE" (with resource!="graphql" as now, because GraphQL sends a read as a POST). A series with no method label counts nothing. A promtool unit test shows that a series without method does not fire the rule, and tests/test_k8s_monitoring_alerting.py pins the new expression.

Actual: the rule fired at 341 on reads.

Environment Diagnostics

Rules from main after #2556. Pod roadmap-service-c645459dc-58wgp, image from before #2556.

Logs, Traces, or Terminal Output

00:28:15 ALERTS{alertname="RoadmapServiceGitHubWritesHigh", alertstate="firing"}
count by (method, resource) (last_over_time(devops_cli_github_requests_total{job="roadmap-service"}[1h]))
  {resource="graphql"} 1
  {resource="core"}    1

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Activity

  1. added
    source/agent
    type/bug
    status/new
    value/medium
    effort/low
    on Oct 29, 2026
  2. dan-petty commented on Oct 29, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The alert rule fires on reads because a negative matcher also matches series with no method label.
    • Priority: P2-Medium. A false alert fires on every read request, causing alert fatigue, but the service itself is not blocked.
    • Value: Medium. False alerts erode trust in the monitoring stack and waste on-call time on every occurrence.
    • Effort: Low. The fix replaces one PromQL matcher and adds a promtool unit test plus a pin in the existing test file.
    • Related: fix(monitoring): the roadmap Service alerts count the first value of a new series and see a lane of a new pod #2505, which asks for a different change. Both fix a PromQL expression in the same alert group in prometheus-values.yaml, but #2505 fixes increase() on a new series while this fixes a false match on absent method labels.
  3. added
    priority/p2-medium
    on Oct 29, 2026
  4. added a commit that references this issue on Oct 29, 2026
  5. removed
    status/new
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions