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

processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 25
  # Keeps only the attribute keys listed, removes every other one, and masks
  # any kept value that matches a blocked pattern.
  redaction:
    allow_all_keys: false
    allowed_keys:
      # Resource attributes are redacted too: without these the backend
      # receives every record as an unknown service.
      - service.name
      - service.namespace
      - deployment.environment.name
      - host.name
      # Record attributes this pipeline needs.
      - http.request.method
      - http.response.status_code
      - http.route
      - url.path
      - user.email
    blocked_values:
      - "[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*\\.[A-Za-z]{2,}"
      - "\\b(4[0-9]{3}|5[1-5][0-9]{2}|2[2-7][0-9]{2})([ -]?[0-9]{4}){3}\\b"
    summary: info
  batch:
    timeout: 5s

exporters:
  otlphttp:
    endpoint: https://your-backend:4318

service:
  pipelines:
    logs:
      receivers: [otlp]
      processors: [memory_limiter, redaction, batch]
      exporters: [otlphttp]
