Label Loki streams with the Compose service name as service_name

Without an explicit service_name, Loki derived it from the container
label (ledgerline-sanctions-1), while spans carry service.name
"sanctions". Grafana's Tempo->Loki link selects on
{service_name="<service.name>"}, so it matched no stream. The czy agent
now sets service_name from com.docker.compose.service; `container` is
unchanged. CLAUDE.md's description of the labels is updated to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Movses Aslanyan
2026-10-13 21:18:55 +03:30
co-authored by Claude Opus 5.5
parent bc11638a15
commit 2c18962243
2 changed files with 17 additions and 4 deletions
+5 -3
View File
@@ -341,9 +341,11 @@ curl -s -u "$A" 'https://prometheus.vione.cloud/api/v1/status/tsdb' | jq '.data.
```
**Logs (Loki)** — confirm `trace_id` is actually in the payload, not just
in the code that was supposed to put it there. The czy agent labels streams with
the full container name (`container` and `service_name` are both e.g.
`ledgerline-gateway-1`):
in the code that was supposed to put it there. The czy agent labels each stream
with `container` (the full container name, e.g. `ledgerline-gateway-1`) and
`service_name` (the Compose service name, e.g. `gateway`, matching the spans'
`service.name` so Grafana's Tempo→Loki link selects the right stream). Streams
from before that relabel (2026-10-13) have `service_name` = the container name:
```bash
curl -s -u "$A" -G 'https://loki.vione.cloud/loki/api/v1/query_range' \
--data-urlencode 'query={container="ledgerline-gateway-1"} | json | trace_id != ""' \