Skip to content

All result timestamps off by 1ms (without alignment turned on) #2932

Closed
@juliusv

Description

@juliusv

If you run a query like this against the latest Cortex release, started with the single-process config at https://github.com/raw/cortexproject/cortex/master/docs/configuration/single-process-config.yaml:

http://localhost:9009/api/prom/api/v1/query_range?query=time()&start=1595846748.806&end=1595846848.806&step=5

...then the first result sample should be at timestamp 1595846748.806, but Cortex reports it at 1595846748.805, and any subsequent samples are off by 1ms as well. Compare to the result by Prometheus at https://demo.promlabs.com/api/v1/query_range?query=time()&start=1595846748.806&end=1595846848.806&step=5.

I didn't turn on the step alignment middleware, so it shouldn't be related to that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions