Skip to content

sdk/log: BatchProcessor may under-report otel.sdk.processor.log.processed{error.type="queue_full"} on shutdown #8213

@mahendrabishnoi2

Description

@mahendrabishnoi2

When BatchProcessor.Shutdown() is called under backpressure, the final q.Dropped() count may never be recorded in the otel.sdk.processor.log.processed metric with error.type=queue_full.

The poll goroutine consumes q.Dropped() and records ProcessedQueueFull each iteration. On shutdown, pollKill is closed, causing the goroutine to return before it can consume the last accumulated dropped count. Shutdown() then flushes the queue and shuts down the exporter, but never checks q.Dropped() itself.

Ref: Identified by @pellared in #7124 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions