You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(telemetry): a cluster job's usage counters count in increase(), though each job pod exports once #2039
Each in-cluster Job (k8s/devops/cronjob.yaml) is a new pod that exports its metrics once, when it exits. So each Job pod's series holds one sample, and increase() or rate() over it gives nothing. The AI usage counters of cluster jobs never show in the dashboards.
Evidence
Found while #1629 was built. #1629 gives roadmap-service one series identity (service.instance.id=roadmap-service) and a flush after each batch. A shared instance id does not fix the Jobs, because the CronJobs use concurrencyPolicy: Allow, so two Jobs can export to the same series at the same time and the collector drops out-of-order deltas.
Proposed remedy
Find the standard answer for short-lived batch jobs in OpenTelemetry: for example, export cumulative totals with a start time, so that Prometheus sees the first sample as an increase from zero, or have the collector's deltatocumulative processor keep the stream across pods.
Check it against the collector version in k8s/otel/ before any code change.
A test shows that two Job runs add up in the query that the dashboards use.
The issue premise cannot be built as written against upstream Prometheus and OpenTelemetry systems. In Prometheus promql/functions.go, the function extrapolatedRate drops each series that contains fewer than two points (if len(samples.Points) < 2 { continue }). Therefore, the function increase() ignores a time series when a batch job exports only one sample upon termination. The collector's prometheus_remote_write exporter sends Prometheus Remote Write 1.0 payloads, which do not transmit start timestamps. Also, the deltatocumulative processor tracks stream identities by hashing resource attributes (service.name, service.instance.id, and host.name). Because each job pod uses a unique pod name, the collector assigns each pod to an isolated stream.
A shared instance identifier does not resolve concurrent jobs. Because k8s/devops/cronjob.yaml sets concurrencyPolicy: Allow, concurrent jobs export interleaved deltas. The deltatocumulative processor drops interleaved deltas with delta.ErrOutOfOrder and delta.ErrOlderStart. Official Prometheus guidance advises using the Pushgateway with recording-rule deduplication, or tracking batch executions through gauges or logs. Per AGENTS.md rule 2, this item returns to New for re-evaluation.
Activity
fix(service): roadmap-service exports its AI usage counters after eve…
dan-petty commentedon Oct 24, 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 issue affects dashboard visibility and telemetry accuracy but does not block core functionality or cause system failures.Improves monitoring and observability for cluster jobs which helps with system health understanding.Requires research into OpenTelemetry standards, collector configuration changes and testing across pod restart scenarios.Both items deal with telemetry issues but item 792 focuses on out-of-order delta metrics while this one addresses cluster job counter visibility.dan-petty commentedon Oct 27, 2026
The issue premise cannot be built as written against upstream Prometheus and OpenTelemetry systems. In Prometheus
promql/functions.go, the functionextrapolatedRatedrops each series that contains fewer than two points (if len(samples.Points) < 2 { continue }). Therefore, the functionincrease()ignores a time series when a batch job exports only one sample upon termination. The collector'sprometheus_remote_writeexporter sends Prometheus Remote Write 1.0 payloads, which do not transmit start timestamps. Also, thedeltatocumulativeprocessor tracks stream identities by hashing resource attributes (service.name,service.instance.id, andhost.name). Because each job pod uses a unique pod name, the collector assigns each pod to an isolated stream.A shared instance identifier does not resolve concurrent jobs. Because
k8s/devops/cronjob.yamlsetsconcurrencyPolicy: Allow, concurrent jobs export interleaved deltas. Thedeltatocumulativeprocessor drops interleaved deltas withdelta.ErrOutOfOrderanddelta.ErrOlderStart. Official Prometheus guidance advises using the Pushgateway with recording-rule deduplication, or tracking batch executions through gauges or logs. Per AGENTS.md rule 2, this item returns to New for re-evaluation.fix(telemetry): export created timestamps for cluster job counters (#…
fix(telemetry): export created timestamps for cluster job counters (#…
chore(main): release 0.7.3 (#2367)