mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-04-01 00:26:53 +00:00
- Adds a loggerprovider based on otlp logger - In demo directory of oltp: - Added grafana for unified view of both traces and logs - tracing now uses oltp from the collector to the jaeger instance Signed-off-by: Hans van den Bogert <hansbogert@gmail.com>
Tracing & Logging Demo
The directory contains sample OpenTelemetry Collector and Jaeger / Loki configurations for a tracing and logging demo.
Configuration
The provided docker-compose.yaml sets up 6 containers:
- PodInfo Frontend on port 9898
- PodInfo Backend on port 9899
- OpenTelemetry Collector listening on port 4317 for GRPC
- Jaeger all-in-one with UI on port 16686
- Loki on port 3100
- Grafana on port 3000
How does it work?
The frontend pod is configured to call the backend pod. Both podinfo pods send traces and logs to the collector at port 4317 using OTLP gRPC.
The collector forwards:
- Traces to Jaeger via OTLP gRPC on port 4317
- Logs to Loki via OTLP HTTP on port 3100
Jaeger exposes its UI on port 16686. Grafana exposes its UI on port 3000 and is
pre-configured with both Jaeger and Loki as datasources.
Running it locally
- Start all the containers
make run
- Send some sample requests
curl -v http://localhost:9898/status/200
curl -X POST -v http://localhost:9898/api/echo
- Visit
http://localhost:16686/to see traces in Jaeger - Visit
http://localhost:3000/to explore logs in Grafana (Explore → Loki) and traces (Explore → Jaeger) - Stop all the containers
make stop