Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range request with millisecond step is rounded to whole seconds #147

Closed
p5i opened this issue Dec 10, 2024 · 3 comments
Closed

Range request with millisecond step is rounded to whole seconds #147

p5i opened this issue Dec 10, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@p5i
Copy link

p5i commented Dec 10, 2024

Hi!

When building the time series request with "range" type and 10ms step, the returned data is rounded to seconds. This leads to bar-like graph and overlay of points.
Here the top graph is built with the "raw" query type and converted to time series with Grafana's tranformations. The bottom one is of "range" type. The queries are similar * | stats by(_time:10ms) count() and * | stats count().
2024-12-10 11-56-10

And here everything is on one screen. Query, step, graph and response.
2024-12-10 11-46-22

The query is correctly converted to VL query with step 10ms
POST /select/logsql/stats_query_range?end=1733187154&query=%2A+%7C+stats+count%28%29&start=1733187134&step=10ms HTTP/1.1
The response from VL contains timestamps with millisecond precision.

{
  "status": "success",
  "data": {
    "resultType": "matrix",
    "result": [
      {
        "metric": {
          "__name__": "count(*)"
        },
        "values": [
          [
            1733187134.04,
            "4"
          ],
          [
            1733187134.16,
            "4"
          ],
          [
            1733187134.1699998,
            "4"
          ],
          [
            1733187134.29,
            "4"
          ],
          [
            1733187134.7,
            "4"
          ],
          [
            1733187134.77,
            "4"
          ],
          [
            1733187134.7900002,
            "40"
          ],
          [
            1733187134.8,
            "8"
...

But then the timestamps are rounded to seconds by datastore plugin or by Grafana.

@Loori-R
Copy link
Contributor

Loori-R commented Dec 10, 2024

@dmitryk-dk could please take a look?

@dmitryk-dk
Copy link
Contributor

Hi @p5i ! The issue was fixed in the latest release. Please check it. If you find any problem with it, feel free to reopen the issue

@p5i
Copy link
Author

p5i commented Dec 13, 2024

@dmitryk-dk Thank you very much. Works great in v0.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants