[Metrics API] Ability to record a metric with a custom timestamp #4343
Labels
spec:metrics
Related to the specification/metrics directory
triage:deciding:needs-info
Not enough information. Left open to provide the author with time to add more details
What are you trying to achieve?
I'd like to be able to develop so-called proxy layers with SDK, where I'd like to register metrics such as gauge and histogram providing custom timestamps. Currently timestamp defaults to the current time such as
Date.now( )
in JavaScript, but in case if we provide metrics exposed from alternative sources ( not with SDK ) - we're not able to proxy those metrics correctly because of the different timestamp.This issue can be easily implemented, but will make SDK much more flexible in terms of registering metrics in a right moment.
So the proposal is:
Additional context.
In our ABAP runtime (internal SAP language) we do not have OTel SDK available out-of-the box. For that purpose we created own SDK ( https://github.com/abapify/otel/ ) and set of exporters ( such as MQTT ) which are streaming telemetry events in a ABAP compatible format ( not OTLP, own format chosen by set of reasons explained here ). So as intermediate layer - we created a NodeJS service which is not generating, but streaming/proxying OpenTelemetry events using JS SDK.
Because of that our charts attract metrics according to how they were processed by proxy service but as they were actually recorded. Currently we face some shift, but there could be more complicated patterns when service is temporary down - metrics will be shown completely wrong..
Unfortunately there are few problem points here. This is one of the problems we do not have a solution for yet.
The text was updated successfully, but these errors were encountered: