[Loki Log driver] Can not to add labels from json

I have installed and working Log driver but can not add labels from logs
Here is my docker-compose logging option for my service

logging:
            driver: 'loki'
            options:
                loki-url: http://host.docker.internal:3100/loki/api/v1/push
                loki-batch-size: 500
                loki-pipeline-stages: |
                    - json:
                        expression:
                            level:
                            msg:
                            timestamp:
                            trace_id: "trace-id"
                    - labels:
                        level:
                        msg:
                        timestamp:
                        trace_id: "trace-id"

logs have those fields but in Grafana I see only labels added with driver by default

for some strange reasons it works after reloading docker machine

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.