open-telemetry / opentelemetry-python

OpenTelemetry Python API and SDK
https://opentelemetry.io
Apache License 2.0
1.66k stars 568 forks source link

Provide options to set a custom time_unix_nano property in the record method #3976

Closed jerryzhou196 closed 1 week ago

jerryzhou196 commented 1 week ago

Is your feature request related to a problem?

None

Describe the solution you'd like

Right now, the primary method for recording data, regardless of all four instruments, seems to be using the record method. However, this record method only has support for an amount and an attributes property. It seems the time_unix_nano is configured to be only when the data is received in my Prometheus database.

Is there some way to configure this time_unix_nano to reflect a custom time-point?

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

None