-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Component(s)
processor/metricstarttime
Describe the issue you're reporting
Recent movement on the promtsdb and promql side of things (arguably orthogonal to this issue) prompted me to think about what changes are worth bringing into processor/metristarttime before we promote it to Beta (as discussed here)
Problem Statement:
There's a lack of adoption of CT/ST instrumentation in the prom->otel chain - expected as the CT feature is experimental. Most scraped prometheus targets:
- do not support an exposition format (prom-proto or om-text or om2.0 in the future) that exposes a CT field and/or
- or lack of proper instrumentation to set CT
My understanding is the prom-receiver’s built-in adjustment functionality is an attempt to provide a first-order approximation of CTs. I’ve raised an issue to disable the receiver’s default adjustment.
The receiver’s adjustment functionality has been made and expanded into its own processor which exposes a lot more configuration ergonomics to the user. The ideal scenario (pending prom ct adoption) for prom-scraped metrics is for the operator to explicitly configure their collectors on how to adjust STs for metrics. I.e some metrics known to be initialized at process start and some may be lazily initialized. The start_time_metric strategy would be a good fit for the former. The subtract_initial_point strategy would work for the latter with the caveat that it is stateful to the collector which incurs a similar issue as this.
What do we think about adding some additional knobs to the processor?
- a new
start_time_attributestrategy that works in a similar fashion tostart_time_metricbut will use the resource’s pod start time or last transition time to the ContainersReady condition - a
skip_if_ct_existsconfig oaramter: if true, the processor shall not do adjustments if the metric already has ST set - allowing fallback strategies to be chained - a
include_metricsandexclude_metricsconfig parameter: filters on the metric name to apply the processor on
All proposed changes are captured in this PR: #43694
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.