Hi, Thanks for the reply.In my Java code I have something like this:private static final Gauge gauge = Gauge.build().name("metric_name").labelNames("label_name").help("Info").register();gauge.labels("label_value").set(metric_value);How do I set timestamp value using GAUGE object? I am using the library (simpleclient_spring_boot) from Prometheus. I do not seem to finf a way of settingt imestamp value.If I cannot do it using Prometheus libraries for Spring-Boot, how else can I use exposition-format from my Java Code and create Prometheus metrics?
On Monday, 25 June 2018 20:04:11 UTC+2, Meier wrote:If you want to add a timestamp you have to append it at the end in the format int64 (milliseconds since epoch, i.e. 1970-01-01 00:00:00 UTC, excluding leap seconds) see https://prometheus.io/docs/instrumenting/exposition_formats/Adding it as label would lead to a new timeseries for each value.Also, as i understand it this is discouraged: see https://github.com/prometheus/client_golang/issues/187#issuecomment-168345993
--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/cbb2ae34-a8e6-4e9c-9a46-3c4914633316%40googlegroups.com.