chore: add TODOs for improvements to st-synthesis)

Signed-off-by: Ridwan Sharif <ridwanmsharif@google.com>
This commit is contained in:
Ridwan Sharif 2026-04-08 17:18:55 +00:00 committed by bwplotka
parent 5933a39a73
commit 2fddc5890c
2 changed files with 2 additions and 0 deletions

View file

@ -261,6 +261,7 @@ loop:
st = p.StartTimestamp()
}
// TODO(ridwanmsharif): Consider injecting a 0 value with the st == t here, instead of skipping an append.
if sl.synthesizeST && st == 0 {
st, val, h, fh, skipAppend, stCache = sl.checkAndSynthesizeStartTime(st, lset, ce, lastMFName, val, h, fh, t)
}

View file

@ -26,6 +26,7 @@ import (
// It maps closely to OpenTelemetry's cumulative-to-delta conversion patterns,
// similar to what is done in the OpenTelemetry Collector's `metricstarttimeprocessor`.
// See https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstarttimeprocessor.
// TODO(ridwanmsharif): Make this a struct usable by a go interface (see https://github.com/prometheus/prometheus/pull/18279#discussion_r3032221849).
type stCache struct {
f *floatSynthesis
h *histogramSynthesis