Skip to content

Conversation

@bwplotka
Copy link
Member

@bwplotka bwplotka commented Oct 28, 2025

Given the recent movement for Prometheus native support of ST (PROM-60) and plans for delta temporality
(PROM-48) it might be beneficial to make (hopefully) last change to Remote Write 2.0 before stabilizing, so:

  • Rename Created Timestamp to Start Timestamp.
  • Move CT/ST from TimeSeries to Sample and Histogram messages.
  • Clarified optionality (0 value meaning unset).

This change is in theory breaking. However, practically we impact should be minimal. See implementation change that will follow. Notice that only receiver part was implemented for CT/ST. Given no sending part was done we expect this feature (ST/CT) not being used, thus breakage impact is minimal. This has been confirmed with early adopters like Mimir (Grafana), Chronosphere, Thanos, Cortex and Google.

See previous discussions and 3 explicit approvals: prometheus/prometheus#17036

Additionally:

  • I updated link to proto.
  • Updated links to new compliance tests.
  • Update native histogram spec link.

cc @alexgreenbank @cstyan @ArthurSens @aknuds1 @krajorama @bboreham @kgoudeaux

Given the recent movement for Prometheus native support of ST
([PROM-60](prometheus/proposals#60)) and plans
for delta temporality
([PROM-48](prometheus/proposals#48)) it might be
beneficial to make (hopefully) last change to Remote Write 2.0 before
stabilizing, so:

* Raname Created Timestamp to Start Timestamp
* Move CT/ST from TimeSeries to Sample and Histogram messages.
* Clarified optionality (0 value meaning unset)

See implementation change that will follow:
prometheus/prometheus#17411. Notice that only
receiver part was implemented for CT/ST. Given no sending part was done
we expect this feature (ST/CT) not being used, thus breakage impact is
minimal. This has been confirmed with early adopters like Mimir
(Grafana), Chronosphere, Thanos, Cortex and Google.

See previous discussions and 3 expilcit approvals:
prometheus/prometheus#17036

Additionally:
* I updated link to proto
* Updated links to new compliance tests
* Update native histogram spec link

Signed-off-by: bwplotka <bwplotka@gmail.com>
@bwplotka bwplotka changed the title RW(breaking;2.0-rc.4): Move CT from TimeSeries to Sample and Histogram; Rename to ST (Start Timestamp) RW2: Move CT from TimeSeries to Sample; Rename to ST (Start Timestamp) Oct 28, 2025
@bwplotka bwplotka changed the title RW2: Move CT from TimeSeries to Sample; Rename to ST (Start Timestamp) RW2(breaking): Move CT from TimeSeries to Sample; Rename to ST (Start Timestamp) Oct 28, 2025
@bwplotka bwplotka changed the title RW2(breaking): Move CT from TimeSeries to Sample; Rename to ST (Start Timestamp) RW 2.0-rc.4 (breaking): Move CT from TimeSeries to Sample; Rename to ST (Start Timestamp) Oct 28, 2025
// in ms format. This information is typically used for counter, histogram (cumulative)
// or delta type metrics.
//
// For cumulative metrics, the start timestamp represents the time when the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if you're going to explain cumulative metrics, I'd also say something about delta metrics. E.g. "For delta type metrics, the start timestamp represents the time to which the delta value is relative to ? Probably something better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They don't exist now and we can do it later. I'd skip for now.

}
// Exemplar represents additional information attached to some series' samples.
// Exemplar is an additional information attached to some series' samples.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not related to start time

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This is intended, see description. It's better to make changes in atomic version bump especially cosmetic like this.

// TimeSeries represents a single series.
message TimeSeries {
reserved 6;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: why not put it in order ? I'd move to the end

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for brevity. This is just shorter snippet of proto.

* `Written` refers to data the `Receiver` has received and is accepting. Whether or not it has ingested this data to persistent storage, written it to a WAL, etc. is up to the `Receiver`. The only distinction is that the `Receiver` has accepted this data rather than explicitly rejecting it with an error response.
* a `Sample` is a pair of (timestamp, value).
* a `Histogram` is a pair of (timestamp, [histogram value](https://github.com/prometheus/docs/blob/b9657b5f5b264b81add39f6db2f1df36faf03efe/content/docs/concepts/native_histograms.md)).
* a `Sample` is a triplet of (start timestamp, timestamp, value).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But start time is optional, so maybe

Suggested change
* a `Sample` is a triplet of (start timestamp, timestamp, value).
* a `Sample` is a pair (timestamp, value) or a triplet of (start timestamp, timestamp, value).

and similar for Histograms.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice I like it, although one could argue (0, timestamp, value) == (timestamp, value), no?

// See https://github.com/prometheus/prometheus/blob/remote-write-2.0/prompb/io/prometheus/write/v2/types.proto#L142
// for a full message that follows the native histogram spec for both sparse
// and exponential, as well as, custom bucketing.
// A native histogram message, supporting
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not related to start time

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This is intended, see description. It's better to make changes in atomic version bump especially cosmetic like this.

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.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.

3 participants