davidB / metrics-influxdb

A reporter for metrics which announces measurements to an InfluxDB server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Timestamp precision for InfluxDB v0.9

ShijunK opened this issue · comments

InfluxDB v0.9 expect timestamp in nanoseconds epoch time by default, instead of milliseconds as in v0.8.

The reporter builder and measure provide default clock from Metrics lib, which report time in milliseconds. The issue can be work around by providing a customized clock, which override Clock#getTime() to report in nanoseconds. However, it might be better to add a precision field to reporter and measure, set it default to nanoseconds for v0.9.

In master, the precision is defined to ms in the request.

see 5ebd76a

Agreed, the UDP Line protocol does not work with InfluxDB 0.9+

the timestamp sent in the message must be in nanoseconds since epoch

should be fixed with 6e6b286