Logging
Use structured logging
- Such as
slog
in golang.
Exporting logs from docker to Loki
There are many options. One option is to use the fluent-bit plugin to export logs to Loki.
Fluent bit docker-compose.yaml
fluent-bit.conf
In the docker-compose for your application, add: