Skip to content

Isolate nonfatal failures in LogRecordProcessor.onEmit - #9067

Open
ultramancode wants to merge 1 commit into
open-telemetry:mainfrom
ultramancode:fix/isolate-log-processor-failures
Open

ultramancode wants to merge 1 commit into
open-telemetry:mainfrom
ultramancode:fix/isolate-log-processor-failures

Conversation

@ultramancode

Copy link
Copy Markdown

Fixes #9066

Log nonfatal failures from LogRecordProcessor.onEmit so they don't propagate to application code. If one processor throws a nonfatal exception, the remaining processors still receive the same log record. Fatal errors are still rethrown.

Added tests for both nonfatal and fatal failures, including a case where the first processor throws a nonfatal exception and the second still receives the record.

I used ThrottlingLogger to limit repeated warnings. The OTLP HTTP and gRPC exporters already use it too, so I think it makes sense to move it to an impl package alongside ThrowableUtil in the follow-up to #9022.

Signed-off-by: Taewoong Kim <ktw2172@gmail.com>
@ultramancode
ultramancode requested a review from a team as a code owner November 26, 2026 11:10
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-11-26 11:46 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Should this be with the author? Comment /dashboard route:author to route it back.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Nov 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.56%. Comparing base (a92b644) to head (936d059).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9067   +/-   ##
=========================================
  Coverage     90.56%   90.56%           
- Complexity    11220    11223    +3     
=========================================
  Files          1032     1033    +1     
  Lines         30599    30607    +8     
  Branches       4010     4010           
=========================================
+ Hits          27711    27720    +9     
  Misses         1913     1913           
+ Partials        975      974    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant