opentelemetry-go-contrib icon indicating copy to clipboard operation
opentelemetry-go-contrib copied to clipboard

Add Redaction to otelhttp

Open fpozzobon opened this issue 2 years ago • 1 comments

Problem Statement

Some attributes passed to attributes might contain sensitive data (example: http.url)

Proposed Solution

As a consumer of the library, it would be great to have possibility to apply redaction (masking value) to a defined set of attributes.

Alternatives

In place of redaction we could:

  1. Apply a filter option which would dismiss the attributes
  2. Apply an option which would enable consumer to define request/response attributes

Prior Art

Redaction option already exists for header

Additional Context

To be compliant with GDPR, it is important for consumer of the library to have the possibility to mask attribute values

fpozzobon avatar Jun 01 '23 17:06 fpozzobon

Related, for mongo: https://github.com/open-telemetry/opentelemetry-go-contrib/pull/3662

I wonder if it wouldn't be good to start an otep on this, so every SDK can use similar approaches.

dmathieu avatar Jun 02 '23 06:06 dmathieu