首页 > 解决方案 > 字符过多的 Prometheus 时间戳

问题描述

我在这里使用 go 远程编写器:https ://github.com/prometheus/prometheus/blob/master/documentation/examples/remote_storage/example_write_adapter/server.go

这条线

fmt.Printf("  %f %d\n", s.Value, s.Timestamp)

打印这个时间戳 1526415583412 并且它的日期是 9/3/50340 这是不可能的。但是如果删除三个字符,它可以工作 1526415583

标签: goprometheus

解决方案


Prometheus 时间戳以毫秒为单位。


推荐阅读