Files
Hans van den Bogert 095b1cd251 feat: add otlp logging support
- 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>
2026-03-14 22:38:14 +01:00
..
2026-03-14 22:38:14 +01:00

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:

  1. PodInfo Frontend on port 9898
  2. PodInfo Backend on port 9899
  3. OpenTelemetry Collector listening on port 4317 for GRPC
  4. Jaeger all-in-one with UI on port 16686
  5. Loki on port 3100
  6. 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

  1. Start all the containers
make run
  1. Send some sample requests
curl -v http://localhost:9898/status/200
curl -X POST -v http://localhost:9898/api/echo
  1. Visit http://localhost:16686/ to see traces in Jaeger
  2. Visit http://localhost:3000/ to explore logs in Grafana (Explore → Loki) and traces (Explore → Jaeger)
  3. Stop all the containers
make stop