Repository navigation
Description
Problem Description
#2039 (pull request #2366) set export_created_metric: true on the collector's prometheus_remote_write exporter in k8s/otel/values.yaml, and enable-feature: created-timestamp-zero-ingestion on the Prometheus server in k8s/monitoring/prometheus-values.yaml. The comments there say that Prometheus then records a zero sample at the start of each counter series, so increase() counts the first export. Prometheus records no such sample. The collector sends remote write 1.0, which has no field for a created timestamp. docs/TELEMETRY.md says the same as the comments.
Reproduction Steps
- Confirm that both settings are live: the Prometheus server runs with
--enable-feature=created-timestamp-zero-ingestion, and the collector's ConfigMap hasexport_created_metric: true(both since 2026-10-27). - Query
devops_cli_github_requests_total[1d]on 2026-10-28. The three series of jobdevops-clithat started on that day start at 1. No series has a zero sample. - Query
count(last_over_time({__name__=~"devops_cli_.*_created"}[10d])). It gives no result.
Expected vs Actual Behavior
Expected: a counter series from the collector starts with a zero sample, or the comments and docs/TELEMETRY.md do not say so. Actual: the first export of each series is not in increase(), and the comments and the document say that it is.
Source: #2496
Proposed design
Problem statement
The collector's prometheus_remote_write exporter uses remote write 1.0, which has no field for a created timestamp. The export_created_metric setting and the Prometheus created-timestamp-zero-ingestion feature do not connect, so Prometheus records no zero sample at the start of each counter series. increase() drops the first export of every series. The comments in both YAML files and docs/TELEMETRY.md state that the mechanism works, which is false.
Acceptance criteria
Requirement: Remote write 2.0 enabled
The collector's prometheus_remote_write exporter SHALL use remote write 2.0 so that created timestamps are transmitted in the payload.
Scenario: Exporter config uses version 2
- WHEN The prometheus_remote_write exporter configuration in k8s/otel/values.yaml is read
- THEN remote_write_version is set to 2 and export_created_metric is absent
Requirement: Zero sample recorded
Prometheus SHALL record a zero-value sample at the created timestamp of each cumulative counter series received via remote write 2.0.
Scenario: New series produces zero sample
- WHEN A new counter series arrives through the collector to Prometheus
- THEN A sample with value 0 exists at the series start timestamp, and count(last_over_time({name=~"devops_cli_.*_created"}[10d])) returns a result
Requirement: increase counts first export
increase() SHALL include the first export of a counter series that starts within the query window.
Scenario: Single-export series counted
- WHEN A counter series has exactly one sample in the lookback window and a zero sample at its start
- THEN increase() over that window returns the counter value, not zero
Requirement: Documentation accurate
docs/TELEMETRY.md and the YAML comments SHALL describe the created-timestamp mechanism using remote write 2.0, not remote write 1.0.
Scenario: Docs reference remote write 2.0
- WHEN A reader consults docs/TELEMETRY.md or the comments in k8s/otel/values.yaml and k8s/monitoring/prometheus-values.yaml
- THEN The text states that remote write 2.0 transmits the created timestamp and Prometheus records the zero sample
Existing Tool Considered
The OpenTelemetry Collector prometheus_remote_write exporter (otel/opentelemetry-collector-contrib) covers the need. It supports remote write 2.0, which transmits created timestamps natively in the OTLP payload. The current configuration uses remote write 1.0 (the default), which has no created-timestamp field. The fix is a configuration change to set remote_write_version to 2 and remove the now-unneeded export_created_metric flag.
Key questions
- Which remote write version does the collector's prometheus_remote_write exporter currently use?: Remote write 1.0 (the default). The configuration in k8s/otel/values.yaml sets no remote_write_version key, so the exporter uses version 1, which has no created-timestamp field in the sample payload. [sources: k8s/otel/values.yaml:89]
- Does the Prometheus server support receiving remote write 2.0?: Yes. The server already enables the created-timestamp-zero-ingestion feature, which is a Prometheus 3.x feature that reads created timestamps from the OTLP-based remote write 2.0 payload. The web.enable-remote-write-receiver flag is also set. [sources: k8s/monitoring/prometheus-values.yaml:22]
- How should the collector transmit created timestamps to Prometheus?: Set remote_write_version to 2 on the prometheus_remote_write exporter. Remote write 2.0 uses the OTLP data model, which carries the created timestamp natively in each cumulative metric. Remove export_created_metric because it is a remote write 1.0 workaround that exports a separate _created metric, which Prometheus's created-timestamp-zero-ingestion feature does not read. (best practice) [sources: k8s/otel/values.yaml:97, k8s/monitoring/prometheus-values.yaml:22]
- Chosen: Remote write 2.0 (OTLP-based). Transmits created timestamps natively in the payload. Prometheus's created-timestamp-zero-ingestion feature was designed to read them from this format. This is the standard mechanism.
- Rejected: Keep remote write 1.0 and export_created_metric. Exports a separate _created metric, which Prometheus's zero-ingestion feature does not consume. The two settings do not connect. This is the current broken state.
- Rejected: Remove both settings and correct documentation only. Admits the mechanism does not work and relies on the alert-rule workaround in fix(monitoring): the roadmap Service alerts count the first value of a new series and see a lane of a new pod #2505. Loses the zero-sample benefit for dashboards and any future queries that use increase() directly.
- Which files must change?: k8s/otel/values.yaml (exporter config and comment), k8s/monitoring/prometheus-values.yaml (comment), and docs/TELEMETRY.md (mechanism description). [sources: k8s/otel/values.yaml:95, k8s/monitoring/prometheus-values.yaml:20, docs/TELEMETRY.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
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 documented zero-sample mechanism does not work because remote write 1.0 has no created timestamp field.Metrics are inaccurate for the first export of each series but the system still functions.The first data point of each counter series is lost in increase() calculations.Fixing requires either upgrading to remote write 2.0 or correcting multiple documentation references.Both address the missing zero sample that causes increase() to drop the first export, but the candidate fixes the telemetry pipeline or docs while 2505 fixes the alert rules.fix(monitoring): the roadmap Service alerts count a series that start…
devops-cli-service commentedon Oct 29, 2026
Status set to Ready at 0f7bc26 (see proposed design in issue body).
fix(telemetry): enable remote write 2.0 for created timestamps (#2629)
chore(main): release 0.16.0 (#2628)