Closed
Description
Is your feature request related to a problem? Please describe.
Currently (v0.101.0), the Debug exporter uses the collector's internal logger for output.
This comes with several consequences:
- The exporter's output is prefixed and suffixed by the internal logger's data.
- The prefix is the current timestamp and the
info
level marker, similar to2023-11-10T22:49:03.510-0600 info
- The suffix is the exporter's metadata in JSON format, similar to
{"kind": "exporter", "data_type": "traces", "name": "debug"}
- The prefix is the current timestamp and the
- The exporter's output is sent to the same destination as the collector's logs (stderr by default). It is not possible to send the Debug exporter's output to a different stream than the collector's internal logs.
- The output from the Debug exporter is sent to the internal logger with the log level
INFO
. This means that if user configures theservice.telemetry.logs.level
toWARN
orERROR
, they will not see the output from the Debug exporter. As a result, it is not possible to configure the collector to see the Debug exporter's output and mute collector's INFO logs at the same time. - The exporter's output is subject to the internal logger's sampling, which is separate from the sampling defined in the exporter's configuration. See [exporter/debug] Debug exporter has sampling enabled by default #9921 and the note in the "Workaround" section of the issue.
Describe the solution you'd like
Add configuration option use_internal_logger
that would make it possible to opt out of using the internal logger and instead use a logger configured separately from the collector's internal logger.
Describe alternatives you've considered
The only alternative I see is not use the Debug exporter and instead build a separate exporter for this, or use existing exporter like the File exporter.