# Collector Contrib 0.136.0. One sampler instance.
# Bind this instance's private interface and install a server certificate
# covering its DNS name. Only approved router clients may connect.
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: ${env:OTEL_SAMPLER_LISTEN}
        tls:
          cert_file: /etc/otel/tls/server.crt
          key_file: /etc/otel/tls/server.key
          client_ca_file: /etc/otel/tls/router-ca.crt
processors:
  tail_sampling:
    decision_wait: 10s
    num_traces: 5000
    expected_new_traces_per_sec: 250
    decision_cache:
      sampled_cache_size: 10000
      non_sampled_cache_size: 10000
    policies:
      - name: any-error
        type: status_code
        status_code:
          status_codes: [ERROR]
  batch: {}
exporters:
  otlp/kept:
    endpoint: trace-a.example.invalid:4317
service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [tail_sampling, batch]
      exporters: [otlp/kept]
