Skip to content

redaction processor does not seem to redact attributes of span event #36633

Closed
@qrli

Description

@qrli

Component(s)

processor/redaction

What happened?

Description

We are using allow_all_keys: true and expects all blocked values are redacted. However, we found some data which should have been redacted got through. After investigation, I found the data failed to be redacted are in span events.

Steps to Reproduce

Put some value to be redacted in attributes of span events, and try to use redaction processor to redact it.

Expected Result

The blocked values are successfully redacted from all traces/logs.

Actual Result

The blocked values in span events leaked through redaction processor.

Collector version

0.111.0

Environment information

Environment

OS: Ubuntu 22.04
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

exporters:    
    otlp:
      endpoint: tempo.xxx.svc:4317
      sending_queue:
        queue_size: 5000
      tls:
        insecure: true
  receivers:
    otlp:
      protocols:
        grpc:
          endpoint: 0.0.0.0:4317
        http:
          endpoint: 0.0.0.0:4318
  processors:
    redaction:
      allow_all_keys: true
      blocked_values:
        - "eyJhbGci[a-zA-Z0-9._-]+"  # jwt tokens
        - "(amqps|mongodb)://[^@]+@" # mq & mongo connection string
        - '[\w\.\-]+(@|%40)[\w\.\-]+' # email
      summary: debug
  service:
    pipelines:
      traces:
        exporters:
          - otlp
        receivers:
          - otlp
        processors: 
          - redaction

Log output

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions