Skip to content

LogRecordBuilder.emit() propagates processor exceptions and skips later processors #9066

Backlog

Description

@ultramancode

Describe the bug

If a LogRecordProcessor throws a nonfatal exception from onEmit, the exception propagates to the application calling LogRecordBuilder.emit(). Processors registered after it never receive the log record.

Steps to reproduce

  1. Register a LogRecordProcessor that throws an IllegalStateException from onEmit.
  2. Register a second processor that increments a counter each time it receives a record.
  3. Call logger.logRecordBuilder().setBody("hello").emit().

What did you expect to see?

The SDK logs the failure, the second processor receives the record, and emit() returns normally.

What did you see instead?

emit() throws IllegalStateException, and the counter stays at zero.

What version and what artifacts are you using?

I reproduced this with io.opentelemetry:opentelemetry-sdk-logs:1.68.0 using the published JARs directly.

Environment

JDK 21

Additional context

This is the log-side follow-up discussed in #9022. I have a fix and will open a PR.

Activity

  1. added
    Bug
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions