Skip to content

Detected field values: Response sometimes has space between digits and units, breaking queries #910

@gtk-grafana

Description

@gtk-grafana

Sometimes we get responses like this:

{"limit":1000,"values":["4.4 kB","568 kB","916 B","949 B","761 B","7.2 kB","865 B","1.7 kB","292 B","575 B","3.7 kB","17 kB","1.9 kB","866 kB","2.5 kB","2.1 kB","479 B","708 B","768 B","799 B","1.1 kB","79 kB","5.4 kB","3.2 kB","681 B","62 kB","596 B","921 B","297 B","3.3 kB","241 kB","6.4 kB","699 B","899 B","515 B","3.4 kB","550 B","2.7 kB","1.2 kB","432 B","1.5 kB","438 B","425 B","29 kB","5.2 kB","793 B","189 B","166 kB","38 kB","562 B","5.7 kB","175 kB","9.7 kB","0 B","13 kB","4.1 kB","654 B","3.1 kB","7.1 kB","30 kB","1.4 kB","409 kB","20 kB","7.6 kB","11 kB","1.8 kB","1.3 kB","504 B","2.6 kB"]}

And other times like this:

{"limit":1000,"values":["514B","116B","136B","154B","807B","908B","642B","775B"]}

Currently the spaces before the unit is making it into the query, which breaks the query as that is not valid logQL.
Please strip out white-spaces before the units and bring up to Loki folks to make sure this isn't a bug Loki side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions