version: "2"
services:

  jaeger:
    image: jaegertracing/all-in-one:latest
    ports:
      - "16686:16686"

  prometheus:
    container_name: prometheus
    image: prom/prometheus:latest
    volumes:
      - ./prometheus.yaml:/etc/prometheus/prometheus.yml
    ports:
      - "9090:9090"

  otel-collector:
    image: otel/opentelemetry-collector-contrib:0.51.0
    volumes:
      - ./otel-config.yaml:/etc/otel/config.yaml
    command: --config /etc/otel/config.yaml
    environment:
      - JAEGER_ENDPOINT=jaeger:14250
    ports:
      - "4317:4317"   # OTLP gRPC receiver
      - "4318:4318"   # OTLP http/protobuf receiver
      - "6831:6831"   # Jaeger thrift compact receiver
      - "6832:6832"   # Jaeger thrift binary receiver
      - "8888:8888"   # Prometheus metrics scrape endpoint with collector telemetry
      - "8889:8889"   # Prometheus metrics exporter (scrape endpoint)
      - "9411:9411"   # Zipkin receiver
      - "13133:13133" # health_check extension
      - "14250:14250" # Jaeger grpc receiver
      - "14268:14268" # Jaeger thrift http receiver
      - "55679:55679" # ZPages extension
    depends_on:
      - jaeger
      - prometheus
