Open rider8581 opened 3 years ago
The unique labels are a feature of Grafana, comparing the unique labels of your query results. To set labels with python-logging-loki use the tags
option in the examples.
tags={"app_label": your_app_name_variable, "host": socket.gethostname()}
@MartijnVanAndel I'm confused about the use of tags and labels here. If you set tags, are these treated as loki Labels? and if so, isn't storing hostname as a label a label antipattern?
It's been quite some time I've been working with this. So don't know if some properties have changed over time. But at the time of writing in 2021 the following was the case:
So I wouldn't say best practice, but it solved label name requirements without programming.
I am pushing logs to loki and it is working nice. But when I show the log in Grafana, it is saying "no unique labels" Could you guide me how I can set the unique label?