opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

OTLP-HTTP-Exporter: Add debug logging to the exporter

Open EddieEldridge opened this issue 3 years ago • 1 comments
trafficstars

Is your feature request related to a problem? Please describe. It's difficult to debug vendor specific issues when there is no way to log out the actual requests to and responses from OTLP endpoints.

Describe the solution you'd like Something like https://github.com/open-telemetry/opentelemetry-collector/blob/7666eb04c30e5cfd750db9969fe507562598f0ae/exporter/otlphttpexporter/otlp.go#L127 but actually log out the request that is going to be sent and the response the server returns.

Describe alternatives you've considered Setting up a proxy server to log out requests/responses although I would consider this a bit extreme for what is required.

Additional context The config might look something like

exporters:
  otlphttp/metrics:
    endpoint: "https://1.2.3.4:1234"
    loglevel: debug

EddieEldridge avatar Jul 05 '22 13:07 EddieEldridge

Don't we have a level that is even more detailed than debug? If so, the body could be logged at that level.

jpkrohling avatar Jul 06 '22 14:07 jpkrohling