On 31.08.21 04:27, Prince wrote:
> for NewMetricWithTimestamp(time.Time,metric) Is it compulsory that the
> time should be in UTC?
Short answer: No.
The Go `time.Time` type includes the time zone. It can use any time
zone. The library will then use the capabilities of the Go `time.Time`
type to convert it into Unix-time, as required by the exposition
format, which is independent of time zones.
In different news: Using the Prometheus instrumentation libraries to
instrument your code counts as using Prometheus and should be
discussed on the Prometheus users mailing list, see
This here is the mailing list to discuss development of the various
Prometheus components itself.