You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a line has a label in structured metadata, and the label is then overwritten by a label format expression, the label filter uses the structured metadata instead of the updated value.
Observe that the first query (the one with the x="foo" filter) produces a result with x="bar", and the second query (the one with the x="bar" filter) produces no result.
Expected behavior
Given that label_format is supposed to always set x to "bar", only the second query (... | label_format x="bar" | x="bar") should ever produce a result. The first query (... | label_format x="bar" | x="foo") should never produce anything, as "bar" != "foo".
Describe the bug
When a line has a label in structured metadata, and the label is then overwritten by a label format expression, the label filter uses the structured metadata instead of the updated value.
To Reproduce
Steps to reproduce the behavior:
/loki/api/v1/push
:Command:
{service_name="test"} | label_format x="bar" | x="foo"
{service_name="test"} | label_format x="bar" | x="bar"
Commands:
x="foo"
filter) produces a result withx="bar"
, and the second query (the one with thex="bar"
filter) produces no result.Expected behavior
Given that
label_format
is supposed to always setx
to"bar"
, only the second query (... | label_format x="bar" | x="bar"
) should ever produce a result. The first query (... | label_format x="bar" | x="foo"
) should never produce anything, as"bar" != "foo"
.Environment:
/bin/bash
Screenshots, Promtail config, or terminal output
The text was updated successfully, but these errors were encountered: