services:
  otelcol:
    image: otel/opentelemetry-collector-contrib:0.120.0
    container_name: psch-otelcol
    command: ["--config=/etc/otelcol-contrib/config.yaml"]
    volumes:
      - ./otel/collector-config.yaml:/etc/otelcol-contrib/config.yaml
    ports:
      - "4317:4317"    # gRPC OTLP receiver (matches psch_otel_endpoint default)
      - "9091:9090"    # Prometheus metrics exporter (host:9091 → container:9090)
      - "13133:13133"  # Health check HTTP endpoint
    healthcheck:
      test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:13133/"]
      interval: 5s
      timeout: 5s
      retries: 10
