Skip to content

fix: LoggingSpanExporter and LoggingMetricExporter flush() always returns success#8361

Open
ADITYA-CODE-SOURCE wants to merge 3 commits intoopen-telemetry:mainfrom
ADITYA-CODE-SOURCE:main
Open

fix: LoggingSpanExporter and LoggingMetricExporter flush() always returns success#8361
ADITYA-CODE-SOURCE wants to merge 3 commits intoopen-telemetry:mainfrom
ADITYA-CODE-SOURCE:main

Conversation

@ADITYA-CODE-SOURCE
Copy link
Copy Markdown

Fixes a bug where LoggingSpanExporter.flush() and LoggingMetricExporter.flush() unconditionally returned success, even if underlying logger handlers failed during flushing. This masked errors from the caller.

Changes

  • Modified LoggingSpanExporter.flush() to return the actual result code instead of calling .succeed() at the end.
  • Applied the same fix to LoggingMetricExporter.flush().

Fixes #8360

…urns success

LoggingSpanExporter.flush() and LoggingMetricExporter.flush() unconditionally
return success even if underlying handlers fail. This masks errors from the
caller.

Fixes open-telemetry#8360
@ADITYA-CODE-SOURCE ADITYA-CODE-SOURCE requested a review from a team as a code owner May 2, 2026 11:31
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 2, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.83%. Comparing base (1b207c6) to head (7195477).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8361      +/-   ##
============================================
+ Coverage     90.82%   90.83%   +0.01%     
  Complexity     7927     7927              
============================================
  Files           895      895              
  Lines         23872    23870       -2     
  Branches       2378     2376       -2     
============================================
+ Hits          21681    21683       +2     
+ Misses         1446     1442       -4     
  Partials        745      745              

☔ View full report in Codecov by Sentry.
📢 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.

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.

LoggingSpanExporter.flush() always returns success masking failures

1 participant