Redaction process only works for string attributes #37590
Labels
bug
Something isn't working
needs triage
New item requiring triage
processor/redaction
Redaction processor
Component(s)
processor/redaction
What happened?
Description
The redaction processor seems to use https://pkg.go.dev/go.opentelemetry.io/collector/pdata/pcommon#Value.Str to convert the value to a string when evaluating
blocked_values
here: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/redactionprocessor/processor.go#L190. This creates some unexpected behavior because of how Value.Str works:I was hoping that the redaction process would be able to redact array values - do you have any advice on how to achieve that? The desired behavior is to either redact the entire array if any element matches a regex or apply redaction to individual elements within the array (masking only the matching values).
Steps to Reproduce
Attempt to use
blocked_values
to redact attributes with type other than stringExpected Result
Redacts the values
Actual Result
Does not redact the values
Collector version
0.89
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: