greptimedb icon indicating copy to clipboard operation
greptimedb copied to clipboard

Using nanosecond precision in the PromQL HTTP API

Open nicecui opened this issue 1 year ago • 0 comments

What type of enhancement is this?

API improvement

What does the enhancement do?

The documentation said:

The timestamp precision in PromQL is limited by its query syntax, only supporting calculations up to millisecond precision. However, GreptimeDB supports storing high-precision timestamps, such as microseconds and nanoseconds. When using PromQL for calculations, these high-precision timestamps are implicitly converted to millisecond precision.

Since GreptimeDB supports high-precision timestamps, it is better for the API endpoints to use nanosecond as the default precision to avoid loss of precision.

Implementation challenges

No response

nicecui avatar May 30 '24 07:05 nicecui