receiver/promettheusreceiver: add option to the metric adjuster to fallback to collector start time #36364
Labels
enhancement
New feature or request
needs triage
New item requiring triage
receiver/prometheus
Prometheus receiver
Component(s)
receiver/prometheusreceiver
Is your feature request related to a problem? Please describe.
When scraping prometheus metrics, there often are no start times associated with the cumulative metrics.
There is a metric adjuster that allows the configurer to specify another metric name from which to pull start time for all metrics scraped but I believe its useful to have a fallback mechanism to fall back to the collector start time.
This is useful especially in serverless workloads or workloads where the collector runs as a sidecar to the target being scraped. We currently use this approach for Cloud Run observability in https://github.com/GoogleCloudPlatform/run-gmp-sidecar/ and its been very useful there.
Describe the solution you'd like
An option added to the config, something like
UseCollectorStartTimeFallback
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: