I’m new to Grafana and Loki, so am most likely doing something wrong.
I’m using the python-logging-loki package to emit logs to Loki. I’m using the branch from this PR to enable JSON records. Optionally sends entire record as JSON instead of only message by henriquelino · Pull Request #28 · GreyZmeem/python-logging-loki · GitHub
This works great, as I can now see additional fields that I supply via the “extra=” arg.
The problem I have now though, is when I explore the logs in grafana, when I add the following, my logs get duplicated; one showing the raw json, and the other showing the log message only.
{app="my_app"} | json | line_format `{{.msg}}`
Is this to be expected or something I’m doing wrong?
How do I prevent the double entries? Deduplication does nothing for me here.
I’m using grafana 11.2.2.