Repository navigation
Description
Problem Description
A review of pull request #2496 found two gaps in the alert rule group roadmap-service in k8s/monitoring/prometheus-values.yaml. A check of the same rules found a third.
RoadmapServiceGitHubRequestsHighandRoadmapServiceModelRequestsHighusesum(increase(...[1h])). Only the OTLP export sends these series. The collector'sdeltatocumulativeprocessor (max_stale: 1h) starts a stream at its first flush, with no zero sample before it, andincrease()does not count that first value. A stream starts again when the Service comes back after more than 1 hour, when a series is idle for more than 1 hour, when the collector restarts, and when a new label set appears. The alert then misses a real overrun of 450 GitHub requests or 352 model requests in one hour.RoadmapServiceLaneStalledcannot fire for a lane that starts no job after the pod is replaced.devops_cli_service_job_start_timestamp_secondscomes only from the scrape of the pod, and the Service sets it first inRepoWorker._execute_batch. After a rollout the series of the old pod goes stale, and the new pod has no series for a lane until the lane starts a job. The alert has no input, and it stays silent while a replica is available and no job starts for more than 2 hours.RoadmapServiceRestarteddoes not cover this case, because a rollout makes a new pod and does not restart a container.- The correction in
RoadmapServiceJobsFailing(offset 1h * 0 or min_over_time(...)) reads the series 1 hour ago with the 5-minute lookback. An error series that has no sample in those 5 minutes is read as new, and the rule adds its full value. The rule also gives no result for a new series with one sample, becauseincrease()needs two samples.
Prometheus does not add a zero sample at the start of these series. On 2026-10-28, devops_cli_github_requests_total series that started after the created-timestamp-zero-ingestion flag and export_created_metric were live (#2039) start at 1, and Prometheus has no devops_cli_*_created series.
Reproduction Steps
Run promtool 3.15.0 (devops install-tools --tool promtool) as promtool test rules with the group roadmap-service and these tests:
- Interval 5m,
devops_cli_github_requests_total{job="roadmap-service", resource="graphql"}with values_x12 300+20x11. At 115m, 520 requests are in the last hour. ExpectedRoadmapServiceGitHubRequestsHigh; got no alert.increase()gives about 240. - Interval 5m,
devops_cli_ai_requests_total{job="roadmap-service", cached="false"}with values_x12 250+15x11. At 115m, 415 model requests are in the last hour. ExpectedRoadmapServiceModelRequestsHigh; got no alert. - Interval 1m,
devops_cli_service_job_start_timestamp_seconds{job="roadmap-service", instance="192.0.2.10:8000", repo="example/app", lane="model"}with values0x30 stale, andkube_deployment_status_replicas_available{namespace="devops", deployment="roadmap-service"}with values1x220. At 200m, expectedRoadmapServiceLaneStalled; got no alert. - Interval 10m,
devops_cli_service_jobs_total{job="roadmap-service", repo="example/app", lane="model", result="error"}with values_x5 5 _ 6 _ _ _ 7. Two jobs failed in the hour before 120m. Expected no alert; gotRoadmapServiceJobsFailingwith "8 model jobs of example/app failed in the last hour". - Interval 10m, the same error series with values
_x6 3. At 65m, expectedRoadmapServiceJobsFailing; got no alert.
Expected vs Actual Behavior
Expected: each volume rule and the failed-jobs rule count the first value of a series that starts in the hour, and never count the value of a series that was there before the hour. A lane of a new pod that starts no job for 2 hours raises RoadmapServiceLaneStalled.
Actual: the rules miss the first value of a new stream, count the full value of a sparse old error series, and see no lane of a new pod before its first job.
Source: #2496
Activity
dan-petty commentedon Oct 28, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
The alert rules produce wrong results: they miss new series values, miscount sparse old series, and stay silent on a new pod lane.Three alert rules miss real overruns and stalled lanes, but the Service still runs and no data is lost.Operators lose visibility into GitHub and model request overruns and stalled lanes, which delays response to real problems.Three rules need different fixes in one file, each requiring correct Prometheus range-vector semantics.Both work on the roadmap-service alert rules in k8s/monitoring/prometheus-values.yaml; #2472 created the rules, the candidate corrects three gaps in their logic.chore(main): release 0.11.0 (#2501)
fix(service): the webhook route refuses an unsigned or oversized deli…
fix(telemetry): Service counters read true across pods and repos (#3680)
fix(telemetry): send cumulative metrics to the Prometheus OTLP receiv…