-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
label semantics with parsers changed in v3.0.0 #12839
Comments
v3.0.0
v3.0.0 with
v2.9.0
|
I believe this was broken in #11587. |
I also believe this is related to metric queries not using the resulting label values either:
The above query in v3.0.0 doesn't have any aggregations including |
jameshartig
changed the title
regexp no longer replaces labels in v3.0.0
label semantics with parsers changed in v3.0.0
Apr 30, 2024
This was referenced Aug 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
We have logs like so:
In Loki v2.9 and earlier
regexp "^~ (?P<level>[^\\s]+)\\s+--\\s+(?P<message>.*?)(?:\\s+--\\s+(?P<kv>.*))?$"
would replacelevel
withDEBUG
but now in v3.0.0 it does not and thelevel
isinfo
. If I change?P<level>
to?P<level2>
then it does pull outlevel2
so I'm inclined to believe the regex is working.We were not using structured metadata prior to switching to v3.0.0 so I'm not sure if structured metadata broke it or v3.0.0 broke it.
To Reproduce
Steps to reproduce the behavior:
{...} | line_format "INFO" | label_format foo="bar" | regexp "^(?P<foo>[^\\s]+)$"
and not
foo: INFO`Expected behavior
I expected regexp to continue to replace labels like it did in versions prior to v3.0.0 that are in the regex. I don't see any mention of this in the CHANGELOG.
Environment:
Screenshots, Promtail config, or terminal output
N/A
The text was updated successfully, but these errors were encountered: