Skip to content

Avoid logging possible sensitive data at info or higher level (debug is ok) #14431

@bogdandrutu

Description

@bogdandrutu

Component(s)

all

What happened?

Describe the bug

In lots places we record some "useful" debugging informations, for example we enhance errors with information about what failed, see: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/abaea0b69c2266c4c9d5e8fd1e6b95e9bf90da55/processor/metricstransformprocessor/metrics_transform_processor_otlp.go#L322 or https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/abaea0b69c2266c4c9d5e8fd1e6b95e9bf90da55/processor/metricsgenerationprocessor/utils.go#L251 and multiple other examples. These errors endup in logs, search for zap.Error usage and usually at Error level.

What did you expect to see?

I would like to make sure:

  1. We have some rules about this.
  2. We stop adding sensitive data to errors.
  3. We stop logging (directly) any sensitive data at level equal or higher with Info which is our default logging level. For debug level we can record it.

What did you see instead?

No rules applied.

Collector version

all

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcollector-telemetryhealthchecker and other telemetry collection issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions