I am using Serilog CompactJsonFormatter which yields JSON log messages. In this case, the level is found in the ‘@l’ property:
{"@t":"2016-06-07T03:44:57.8532799Z","@mt":"Hello, {User}","User":"nblumhardt","@l":"Debug"}
However, using LogQL, I find myself unable to do this with properties that have a ‘@’ in them:
{app="test"} | json level="@l" | level = `Error`
Giving me a cannot parse expression [@l]: syntax error: unexpected $end, expecting LSB or FIELD error.
I cannot simply escape it with ‘\’, as this will give me another error:
parse error at line 1, col 66: invalid char escape. Make sure that all special characters are escaped with \.
How do I properly parse the ‘@l’ JSON property into a label?