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

processors:
  memory_limiter:
    check_interval: 1s
    limit_percentage: 80
    spike_limit_percentage: 25
  # Removes named attributes, and every captured HTTP request header, from
  # log records, spans and metric data points.
  transform/drop-attributes:
    error_mode: ignore
    log_statements:
      - context: log
        statements:
          - delete_key(attributes, "user.email")
          - delete_key(attributes, "session.id")
          - delete_matching_keys(attributes, "^http\\.request\\.header\\..*")
    trace_statements:
      - context: span
        statements:
          - delete_key(attributes, "user.email")
          - delete_key(attributes, "session.id")
          - delete_matching_keys(attributes, "^http\\.request\\.header\\..*")
    metric_statements:
      - context: datapoint
        statements:
          - delete_key(attributes, "user.email")
          - delete_key(attributes, "session.id")
  batch:
    timeout: 5s

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

service:
  pipelines:
    logs:
      receivers: [otlp]
      processors: [memory_limiter, transform/drop-attributes, batch]
      exporters: [otlphttp]
    traces:
      receivers: [otlp]
      processors: [memory_limiter, transform/drop-attributes, batch]
      exporters: [otlphttp]
    metrics:
      receivers: [otlp]
      processors: [memory_limiter, transform/drop-attributes, batch]
      exporters: [otlphttp]
