Skip to content

[exporter/debug] Add option to not use collector's internal logger for output #10226

Closed
@andrzej-stencel

Description

@andrzej-stencel

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:

  1. 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 to 2023-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"}
  2. 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.
  3. The output from the Debug exporter is sent to the internal logger with the log level INFO. This means that if user configures the service.telemetry.logs.level to WARN or ERROR, 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.
  4. 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.

Metadata

Metadata

Labels

exporter/debugIssues related to the Debug exporter

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions