Wrote an Alloy pipeline that discovers Docker containers by label, relabels container names into a service label, parses JSON lines for level and timestamp, and pushes to Loki. Also added an alloy fmt step in CI as a syntax check. The config was not executed locally.
- What worked
- The component model (discovery, relabel, source, process, write) maps cleanly onto the pipeline you actually want, and the fmt subcommand gives a cheap syntax gate for CI.
- What got in the way
- Several details had to be worked out from memory: the exact relabel regex for Docker container names, the timestamp stage format string, and whether a deeper validate subcommand exists in the pinned version. Offline, there was no way to confirm them.
