Repository navigation
Description
Problem or Motivation
No devops-cli OTLP series starts with a zero sample: count(min_over_time(devops_cli_github_requests_total[24h]) == 0) is empty (0 of 179 series). So increase() cannot count the first sample of a new stream. Runner Jobs: 680 commands in 7 d, increase() 555 (-18 %); job devops-cli-job sent 35 GitHub requests in 24 h, and increase() returns no data; the 45 series with 2 samples or fewer hold 86 requests, and increase() reads 16; the only Qdrant retry in 30 d reads 0. The setting 'remote_write_version: 2' (k8s/otel/values.yaml:125-127) has no effect: prometheusremotewriteexporter config.go at contrib v0.161.0 has no such key, and the confmap decoder ignores unknown keys of this exporter (IgnoreUnused, confmap/internal/decoder.go:278-279), so the collector logs no error. The exporter README calls remote write 2.0 'In Development ... not ready for usage'. docs/TELEMETRY.md:28-34, src/devops_cli/docs/generator.py:1109 and tests/telemetry/test_telemetry_instruments.py:1369 state or test the wrong claim. Also, deltatocumulative max_stale 1h (k8s/otel/values.yaml:70-71) is shorter than many export gaps: a retitle row series exports every ~65 min and its increase() is 0 over 22 samples; the Service has 344 equal consecutive samples in 24 h (each one a lost export); a workstation series counts 29 of 34 checks (-15 %).
Proposed Solution & Architectural Design
Keep deltatocumulative. In the metrics pipeline, replace the prometheus_remote_write exporter with an otlphttp exporter with metrics_endpoint http://prometheus-server.monitoring.svc.cluster.local:9090/api/v1/otlp/v1/metrics. In k8s/monitoring/prometheus-values.yaml (Prometheus v3.15.0) add the server flag web.enable-otlp-receiver and the config block otlp: {translation_strategy: UnderscoreEscapingWithoutSuffixes}; keep created-timestamp-zero-ingestion and out_of_order_time_window. The v3.15.0 OTLP translator passes the start time of each point to Append (storage/remote/otlptranslator/prometheusremotewrite/number_data_points.go:65,109), and the head adds the zero sample with fastRejectOOO (tsdb/head_append_v2.go:150-151, 362-410), so a zero cannot land in the middle of a series. Keep the cluster label with a transform statement that sets the datapoint attribute cluster. Remove remote_write_version. Set max_stale to 25h (the collector tracks 575 to 788 streams). Add a panel to otel-collector.json with sum by (error) (rate(otelcol_deltatocumulative_datapoints{error!=''}[$__rate_interval])) (0.18 % dropped today). Correct the docs and the generator text, and replace the test of the dead key with a test of the OTLP target. Record the rejected options in design.md: remote write 2.0 through its feature gate (In Development), otlp-native-delta-ingestion ('very early stage' on the Prometheus feature flags page), the Prometheus otlp-deltatocumulative flag (the same in-memory state), and a service.instance.id for each process (one series with one sample for each command). Known cost: one break in each devops-cli OTLP series, because the otel_scope_name label goes (promote_scope_metadata is false by default; no rule, panel or test selects it).
Target Subsystem
Kubernetes & Minikube Automation (OpenTelemetry Collector and Prometheus).
Existing Tool Considered
The Prometheus OTLP receiver (web.enable-otlp-receiver, Prometheus v3.15.0) and the collector otlphttp exporter are open tools with a standard interface. No new code. The solution lists the rejected options.
Acceptance Criteria
- A test shows that the metrics pipeline of k8s/otel/values.yaml exports only to an otlphttp exporter whose metrics_endpoint ends in /api/v1/otlp/v1/metrics, and that max_stale is 25h or more.
- A test shows that the Prometheus values hold web.enable-otlp-receiver, otlp.translation_strategy UnderscoreEscapingWithoutSuffixes and created-timestamp-zero-ingestion.
- 'git grep remote_write_version' returns nothing.
- Live, 24 h after the rollout: count(min_over_time(devops_cli_github_requests_total[24h]) == 0) > 0; for job devops-cli-job, sum(increase(devops_cli_command_total[24h])) is within 2 % of sum(max_over_time(devops_cli_command_total[24h])) (today 555 against 680 over 7 d); histogram_count(sum(increase(devops_cli_command_duration_seconds[1h]))) returns a value (native histograms arrive).
- Live: the dropped share of deltatocumulative points stays under 0.5 % over 24 h (today 0.18 %), and the new otel-collector panel shows it.
- Live: resets(devops_cli_github_throttle_wait_seconds[24h]) has no reset outside a pod or collector start; if one stays, the issue records the reproduction for the owner decision on an upstream report.
Files
k8s/otel/values.yamlk8s/monitoring/prometheus-values.yamlk8s/monitoring/dashboards/otel-collector.jsondocs/TELEMETRY.mdsrc/devops_cli/docs/generator.pytests/telemetry/test_telemetry_instruments.pytests/fixtures/metrics/otel-collector.yaml
Dependencies
None.
Source: #4675
Activity
dan-petty commentedon Nov 11, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(telemetry)scope of the title gives the scope.Telemetry accuracy is degraded by 15 to 18 percent but the system still runs, so this is a correctness defect not an outage.Operators lose a measurable share of request counts and retry signals, which weakens alerting and capacity decisions.The change touches the collector exporter, Prometheus values, docs, generator text, tests, and design.md, but the candidate states no new code is needed.Both fix increase() dropping the first sample due to a missing zero sample, but the candidate switches to the OTLP receiver while #2506 used remote write 2.0.dan-petty commentedon Nov 12, 2026
Build note:
max_stalestays at 1h. The other parts of the solution are built as written.Evidence:
roadmap-service,roadmap-service-activityandcrawl4aiink8s/monitoring/prometheus-values.yamlcount a series with no sample in the hour before by its last value:last_over_time(x[1h]) unless last_over_time(x[1h] offset 1h)(fix(monitoring): the roadmap Service alerts count the first value of a new series and see a lane of a new pod #2505). With max_stale 1h, such a series is a new stream, so its last value is the count of the hour. With 25h, a series that is idle for 1 h to 25 h keeps its old total. Example: a GitHub request series of the Service with a total of 50 that gets one request after 3 h reads 51 inRoadmapServiceGitHubRequestsHigh.opentelemetry/sdk/metrics/_internal/aggregation.py). So the zero sample of a restarted stream lands after the last sample of the old stream: the series reads old total, 0, new value, andincrease()counts the new value. A zero sample that is older than the last sample of the series is refused (tsdb/head_append_v2.golines 362 to 410 at v3.15.0), so a continued stream gets no zero sample in its middle.A test now holds
max_staleat 1h together with the[1h] offset 1hrules. If 25h is still wanted, those rules must first change, in a separate issue.devops-cli-service commentedon Nov 12, 2026
Released in v0.116.1: https://github.com/dan-petty/devops-cli/releases/tag/v0.116.1
devops-cli-service commentedon Nov 12, 2026
Live since 2026-11-12 05:27 UTC