services: newt: build: . image: newt:dev env_file: - .env environment: - NEWT_METRICS_PROMETHEUS_ENABLED=false # important: disable direct /metrics scraping - NEWT_METRICS_OTLP_ENABLED=true # OTLP to the Collector # optional: # - NEWT_METRICS_INCLUDE_TUNNEL_ID=false # If Newt itself exposes ports, DO NOT map 2112 here # ports: [] otel-collector: image: otel/opentelemetry-collector-contrib:latest command: ["--config=/etc/otelcol/config.yaml"] volumes: - ./examples/otel-collector.yaml:/etc/otelcol/config.yaml:ro ports: - "4317:4317" # OTLP gRPC - "8889:8889" # Prometheus Exporter (scraped by Prometheus) prometheus: image: prom/prometheus:latest volumes: - ./examples/prometheus.with-collector.yml:/etc/prometheus/prometheus.yml:ro ports: - "9090:9090"