Skip to content

End span even if ExtendedSpanProcessor.onEnding throws - #9022

Open
ultramancode wants to merge 1 commit into
open-telemetry:mainfrom
ultramancode:fix/span-onending-exception
Open

ultramancode wants to merge 1 commit into
open-telemetry:mainfrom
ultramancode:fix/span-onending-exception

Conversation

@ultramancode

Copy link
Copy Markdown

Fixes #9021

SdkSpan.endInternal now catches a throwable from ExtendedSpanProcessor.onEnding, calls ThrowableUtil.propagateIfFatal, and logs a warning, so the span still moves to ENDED and reaches onEnd.

Added two tests in SdkSpanTest, for a runtime and a checked exception from onEnding.

Signed-off-by: Taewoong Kim <ktw2172@gmail.com>
@ultramancode
ultramancode requested a review from a team as a code owner November 8, 2026 15:46
@linux-foundation-easycla

linux-foundation-easycla Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: ultramancode / name: Taewoong Kim (17d85e1)

@opentelemetry-pr-dashboard

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

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-11-08 16:17 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.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.33%. Comparing base (f02bddc) to head (17d85e1).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9022      +/-   ##
============================================
- Coverage     90.35%   90.33%   -0.02%     
+ Complexity    11017    11015       -2     
============================================
  Files          1021     1021              
  Lines         30128    30132       +4     
  Branches       3933     3933              
============================================
- Hits          27221    27220       -1     
+ Misses         1953     1952       -1     
- Partials        954      960       +6     

☔ 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.

Exception from ExtendedSpanProcessor.onEnding escapes Span.end() and drops the span

1 participant