receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318
  
  docker_stats:
    endpoint: unix:///var/run/docker.sock
    collection_interval: 30s

  filelog:
    include:
      - /var/lib/docker/containers/*/*.log
    operators:
      - type: json_parser
        timestamp:
          parse_from: attributes.time
          layout: '%Y-%m-%dT%H:%M:%S.%LZ'

processors:
  batch:
    send_batch_size: 1024
    timeout: 5s

  resourcedetection:
    detectors: [system, docker]
    timeout: 5s

exporters:
  otlp:
    endpoint: ${OPHION_SERVER:-10.83.23.4}:4317
    tls:
      insecure: true

  otlphttp:
    endpoint: http://${OPHION_SERVER:-10.83.23.4}:4318
    tls:
      insecure: true

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch, resourcedetection]
      exporters: [otlp]
    metrics:
      receivers: [otlp, docker_stats]
      processors: [batch, resourcedetection]
      exporters: [otlp]
    logs:
      receivers: [otlp, filelog]
      processors: [batch, resourcedetection]
      exporters: [otlp]
