# OpenTelemetry Collector configuration for local development
# Receives OTLP metrics from the webapp and exposes them in Prometheus format

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

processors:
  batch:
    timeout: 10s
    send_batch_size: 1024

exporters:
  prometheus:
    endpoint: 0.0.0.0:8889
    namespace: triggerdotdev
    const_labels:
      source: otel_collector
    resource_to_telemetry_conversion:
      enabled: true

  # Debug exporter for troubleshooting (optional, uncomment to enable)
  # debug:
  #   verbosity: detailed

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [prometheus]

