Repository navigation
Closed
Labels
priority/p0-criticalPriority P0: a release blocker or a critical defectscope/telemetryOpenTelemetry tracing spans, Prometheus metrics, and Jaegertype/bugType bug: the code does not do what it must
Milestone
Description
Context & Rationale
On the homelab on 2026-10-01, the OpenTelemetry collector's prometheusremotewrite exporter dropped most of the metric points devops-cli sends:
- Counts. At the feat(k8s): llm gateway, otel collector and prometheus dashboards over metrics the cluster collects (
k8s/monitoring/dashboards/) #693 capture, the collector had counted 1270 metric points failed and 138 sent. - Logs. Over one hour,
kubectl -n otel logs deploy/otel-collector-opentelemetry-collectorlogged 182 lines ofExporting failed. Dropping data.. Every one came fromotelcol.component.id: prometheusremotewrite, witherror: context deadline exceeded.
The exporter writes to http://k8s-monitoring-alloy-metrics.monitoring.svc.cluster.local:9090/api/v1/write (k8s/otel/values.yaml:79-84). That endpoint came in with fdd4d0f (#734), which is in no tag yet. The obvious causes don't explain the timeouts. Each of these was checked read-only:
- the Service exposes
metrics:9090; - its endpoint,
k8s-monitoring-alloy-metrics-0, is ready; prometheusMetricsReceiveris enabled on alloy-metrics (k8s/monitoring/k8s-monitoring-values.yaml:68-70);- the monitoring perimeter admits the
otelnamespace on 9090 (k8s/monitoring/networkpolicy.yaml:47-53); - Alloy logs no errors or warnings.
While this goes on, devops-cli's command, review, RAG and spend metrics mostly never reach Prometheus. #692's dashboards then undercount or show nothing.
Scope & Deliverables
- Deliverable:
- Find why the collector's remote-write times out, and fix the configuration that causes it. Candidates to rule out, each with evidence:
- Alloy's receiver forwarding to Prometheus synchronously (
k8s/monitoring/k8s-monitoring-values.yaml:12); - the collector's default 5 s exporter timeout and queue settings;
- batch size;
- the
deltatocumulativeprocessor's output.
- Alloy's receiver forwarding to Prometheus synchronously (
- Record the cause in the task file.
- Find why the collector's remote-write times out, and fix the configuration that causes it. Candidates to rule out, each with evidence:
- Acceptance criteria:
- On the homelab, after one hour of normal use,
otelcol_exporter_send_failed_metric_points{exporter="prometheusremotewrite"}stays at zero, or at a stated, explained floor. devops prometheus query 'devops_cli_command_total'returns the series for commands run in that hour.- A test pins the configuration change, for example the exporter's timeout or queue, or the receiver path.
- Tests never touch the network.
uv run devops cipasses.
- On the homelab, after one hour of normal use,
- Key questions:
- Should the collector write straight to the Prometheus server, which has
web.enable-remote-write-receiver, instead of through Alloy? Decide once the cause is known. - Priority? P1 until the cause is confirmed. If the cause is the fdd4d0f configuration, this becomes a P0 critical fix for the current release, because that commit is unshipped and feat(cli): devops-cli dashboards chart the metrics the cli sends and the grafana sidecar provisions them #692's dashboards depend on it.
- Should the collector write straight to the Prometheus server, which has
- Constraint: The agent reads the cluster only. Any change to the running stack goes through
devops k8s deploy-stack, run by a person.
Strategic Alignment
- Milestone: Backlog
- Depends on: none. Related: feat(cli): devops-cli dashboards chart the metrics the cli sends and the grafana sidecar provisions them #692, feat(k8s): llm gateway, otel collector and prometheus dashboards over metrics the cluster collects (
k8s/monitoring/dashboards/) #693, feat(k8s): modernize monitoring stack, llm profiles, traefik routing, and remove squid proxy #734.
Metadata
Metadata
Assignees
Labels
priority/p0-criticalPriority P0: a release blocker or a critical defectscope/telemetryOpenTelemetry tracing spans, Prometheus metrics, and Jaegertype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 1, 2026
Placement (2026-10-01): v0.2.28. Value High, Effort Medium. Not Ready yet. If diagnosis shows the cause is fdd4d0f's collector configuration, which ships in v0.2.24, this becomes a P0 regression fix.
Checked against
release/v0.2.24at d38251e. What stops it being Ready:devops k8s deploy-stackrun by a person.dan-petty commentedon Oct 1, 2026
Diagnosis (2026-10-01, read-only on homelab-k3s and the v0.2.24 release tip 6919c02). None of the four candidate causes holds. Two separate faults explain the lost metrics.
k8s/otel/values.yaml:80sends remote-write tok8s-monitoring-alloy-metrics...:9090/api/v1/write. Alloy'sprometheus.receive_http, as k8s-monitoring 4.5.2'sprometheusMetricsReceiverrenders it, registers onlyPOST /api/v1/metrics/write./api/v1/writeanswers 404, and/api/v1/metrics/writeanswers 405 to a GET, so the route exists.prometheus_receive_http_request_duration_seconds_count{method="POST",status_code="404"} 245, with no POST answered any other way, andprometheus_forwarded_samples_total{component_id="prometheus.receive_http.default"} 0.failed to send WriteRequest ... "status_code": 404. The exporter treats a 4xx as permanent, so every devops-cli point is dropped without a retry./api/v1/metrics/write.kube-prometheus-kube-prome-prometheus, a Service that disappeared at about 07:16 UTC. The name now returns NXDOMAIN.Exporting failed. Dropping data.lines withcontext deadline exceededall come from that dead host, not from Alloy.devops k8s deploy-stack).Alloy's onward write to Prometheus is healthy:
/api/v1/writeon the Prometheus server shows 14,207 responses with code 204. Prometheus has had nodevops_cli_*series for at least 3 days.By this issue's own rule, cause 1 makes this a P0 regression shipping in v0.2.24. It is Copilot thread
k8s/otel/values.yaml:80on release PR #905.[-]fix(telemetry): the collector's remote-write to alloy times out and drops most devops-cli metrics[/-][+]fix(telemetry): the collector remote-writes devops-cli metrics to the path alloy serves[/+]fix(telemetry): the collector remote-writes devops-cli metrics to the…
dan-petty commentedon Oct 1, 2026
Closed by #910, merged into
release/v0.2.24.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.24 (#905)