Supporting timestamp in prometheus exporter #3696
Unanswered
kotharironak
asked this question in
Q&A
Replies: 1 comment 2 replies
-
@jsuereth what do you think? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As per otel metrics proto, each metric's NumberDataPoint has a timestamp -
[time_unix_nano](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto#L376)
- for recording the moment when the observation was aggregated.But, in the Prometheus-exporter, this value is ignored while creating samples (link of createSample function). In my understanding, it is designed from sdk point of view and use in the application, so it will be a scrap moment when these metrics were collected.
I am looking into Kafka sink kind of a job where otlp metrics converted Prometheus format. I would like to re-use this exporter library. In that context, is there a way to support the
time_unix_nano
in this library while exporting? Can we make this library generic?e.g Should we extend the signature of createSample to take timestamp?
Beta Was this translation helpful? Give feedback.
All reactions