Stack completa de observabilidade com Docker Compose - Python, PHP, Prometheus, Loki, OpenTelemetry e Grafana
1. Retomando: as peças soltas até aqui Cada artigo desta série subiu uma peça isolada: Prometheus + Loki + Grafana no artigo 1, a mini app Python no artigo 2, a mini app PHP no artigo 3, envio de logs para o Loki no artigo 4, e instrumentação de traces (por enquanto só impressos no console) no artigo 5. Este artigo une tudo em um único docker-compose.yml , com uma peça nova: um coletor…
This article brings together all the previously covered components of observability into a single docker-compose.yml file, featuring a new OpenTelemetry collector. The collector receives traces from the mini apps through OTLP and forwards them. In the previous articles, each mini app exported spans directly to the console (ConsoleSpanExporter), but this approach is not how real applications communicate with an observability stack.
The OpenTelemetry Collector simplifies this process by acting as the intermediary. The mini apps continue to export to the same place (the collector via OTLP), while the collector decides where the data goes next, handling tasks like tracing, sampling, attribute enrichment, or multiple destinations simultaneously. Changing the backend becomes a configuration change of the collector, not a redeployment of each instrumented application.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.