Skip to content

fix(telemetry): export created timestamps for cluster job counters (#2039) - #2366

Merged
dan-petty merged 1 commit into
mainfrom
fix/2039-job-metrics-increase
Oct 27, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/2039-job-metrics-increase

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Closes #2039

Summary

Cluster job pods run once and export metrics only at exit. In Prometheus PromQL, increase() drops series with fewer than two samples.

This change configures the OpenTelemetry Collector remote-write exporter to export created timestamp metrics. It configures Prometheus server with the feature flag created-timestamp-zero-ingestion so Prometheus ingests synthetic zero-value samples at the series start time. Single-export cluster jobs now accumulate correctly in increase() queries.

Changes

  • Enable export_created_metric: true under config.exporters.prometheus_remote_write in k8s/otel/values.yaml.
  • Add enable-feature: created-timestamp-zero-ingestion under server.extraArgs in k8s/monitoring/prometheus-values.yaml.
  • Document created timestamp metrics and Prometheus zero-value sample ingestion in docs/TELEMETRY.md.
  • Add unit tests verifying configuration values and the PromQL increase() calculation behavior in tests/test_telemetry_instruments.py.

…2039)

Cluster job pods run once and export metrics only at exit. In Prometheus PromQL, increase() drops series with fewer than two samples.

Configure the OpenTelemetry Collector remote-write exporter to export created timestamp metrics. Configure Prometheus server with the feature flag created-timestamp-zero-ingestion so Prometheus ingests synthetic zero samples at the series start time. Single-export cluster jobs now accumulate correctly in increase() queries.

Closes #2039
@dan-petty
dan-petty force-pushed the fix/2039-job-metrics-increase branch from f6c1f63 to 6e551e3 Compare October 27, 2026 18:51
@dan-petty
dan-petty marked this pull request as ready for review October 27, 2026 18:57
@dan-petty
dan-petty merged commit cc34caa into main Oct 27, 2026
16 checks passed
@dan-petty
dan-petty deleted the fix/2039-job-metrics-increase branch October 27, 2026 18:58
dan-petty pushed a commit that referenced this pull request Oct 27, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.7.3](v0.7.2...v0.7.3)
(2026-10-27)


### Bug Fixes

* **ai:** a saved gateway route table keeps only failover state, so a
changed default route reaches every machine
([#2364](#2364))
([8317526](8317526))
* **k8s:** delete unused portkey routing configmap
([#2363](#2363))
([15bd601](15bd601))
* **telemetry:** export created timestamps for cluster job counters
([#2039](#2039))
([#2366](#2366))
([cc34caa](cc34caa))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(telemetry): a cluster job's usage counters count in increase(), though each job pod exports once

1 participant