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

debug exporter missing sending queue

Open dentonk opened this issue 4 weeks ago • 3 comments

Component(s)

exporter/debug

What happened?

Describe the bug The README for the debug exporter indicates it supports the sending_queue functionality from the exporterhelper. However, factory.go does not include the exporterhelper.WithQueue(cfg.QueueConfig), for any of the telemetry types.

Steps to reproduce

  • Create simple pipeline with otlp receiver, debug exporter
  • enable batching in the sending_queue
  • send sample telem
  • review output to see "log records":X message

What did you expect to see? An indication that the items were batched

What did you see instead? Message indicated no batching was taking place

Collector version

v1.43.0/v0.137.0

Environment information

Environment

OS: debian 11.5 Compiler(if manually compiled): go version go1.24.5 linux/arm64

OpenTelemetry Collector configuration

receivers:
    otlp:
        protocols:
            grpc:
                endpoint: 0.0.0.0:4317
            http:
                endpoint: 0.0.0.0:4318
exporters:
    debug:
        sending_queue:
            batch:
                flush_timeout: 5s
                min_size: 1000000
                max_size: 2000000
                sizer: bytes
            enabled: true
            num_consumers: 5
            sizer: bytes
            queue_size: 10000000
        verbosity: basic
service:
    pipelines:
        logs:
            receivers:
                - otlp
            exporters:
                - debug
    telemetry:
        metrics:
            readers:
                - pull:
                    exporter:
                        prometheus:
                            host: localhost
                            port: 8888
            level: normal

Log output

{"level":"info","ts":"2025-10-14T14:54:53.443-0400","msg":"Logs","resource":{"service.instance.id":"0199cf03-a7ea-7d5d-8e55-39f4fde73fa6","service.name":"/opt/observiq-otel-collector/observiq-otel-collector","service.version":"v1.85.3"},"otelcol.component.id":"debug/Debug","otelcol.component.kind":"exporter","otelcol.signal":"logs","resource logs":1,"log records":1}
{"level":"info","ts":"2025-10-14T14:54:53.452-0400","msg":"Logs","resource":{"service.instance.id":"0199cf03-a7ea-7d5d-8e55-39f4fde73fa6","service.name":"/opt/observiq-otel-collector/observiq-otel-collector","service.version":"v1.85.3"},"otelcol.component.id":"debug/Debug","otelcol.component.kind":"exporter","otelcol.signal":"logs","resource logs":1,"log records":1}

Additional context

I recompiled with the missing exporterhelper.WithQueue(cfg.QueueConfig), and everything worked as expected:

func createLogs(ctx context.Context, set exporter.Settings, config component.Config) (exporter.Logs, error) {
	cfg := config.(*Config)
	exporterLogger := createLogger(cfg, set.Logger)
	debug := newDebugExporter(exporterLogger, cfg.Verbosity)
	return exporterhelper.NewLogs(ctx, set, config,
		debug.pushLogs,
		exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}),
		exporterhelper.WithTimeout(exporterhelper.TimeoutConfig{Timeout: 0}),
		exporterhelper.WithQueue(cfg.QueueConfig),
		exporterhelper.WithShutdown(otlptext.LoggerSync(exporterLogger)),
	)
}

TelemGen:

./go/bin/telemetrygen logs --otlp-endpoint localhost:4317 --otlp-insecure --duration 1m --body 'This is a log'

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

dentonk avatar Oct 15 '25 13:10 dentonk