Skip to content

fix: Make etw logs exporter synchronous#514

Merged
cijothomas merged 2 commits intoopen-telemetry:mainfrom
berkus:refactor/switch-etw-exporter-to-processor
Jan 6, 2026
Merged

fix: Make etw logs exporter synchronous#514
cijothomas merged 2 commits intoopen-telemetry:mainfrom
berkus:refactor/switch-etw-exporter-to-processor

Conversation

@berkus
Copy link
Contributor

@berkus berkus commented Jan 6, 2026

Remove block_on calls and remove otel Exporter trait impl.

Fixes #511

Changes

ETW Logs exporter now does not invoke asynchronous Exporter impl under the hood. The call was a fake (using block_on) anyway, and it could cause problems if, for example, a tracing log macro was called under another block_on() async block - nesting block_on()s is forbidden.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@berkus berkus marked this pull request as ready for review January 6, 2026 16:48
@berkus berkus requested a review from a team as a code owner January 6, 2026 16:48
@berkus berkus force-pushed the refactor/switch-etw-exporter-to-processor branch from 663aa58 to f1cdd27 Compare January 6, 2026 16:49
@codecov
Copy link

codecov bot commented Jan 6, 2026

Codecov Report

❌ Patch coverage is 82.14286% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.7%. Comparing base (4b24b0c) to head (4670659).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
opentelemetry-etw-logs/src/exporter/mod.rs 79.1% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #514     +/-   ##
=======================================
- Coverage   55.8%   55.7%   -0.1%     
=======================================
  Files         77      77             
  Lines      12500   12472     -28     
=======================================
- Hits        6980    6954     -26     
+ Misses      5520    5518      -2     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@berkus berkus changed the title Make etw logs exporter synchronous fix: Make etw logs exporter synchronous Jan 6, 2026
@berkus berkus force-pushed the refactor/switch-etw-exporter-to-processor branch 2 times, most recently from fd011ec to f7e1357 Compare January 6, 2026 18:09
@berkus berkus force-pushed the refactor/switch-etw-exporter-to-processor branch from f7e1357 to 4670659 Compare January 6, 2026 18:11
@berkus berkus requested a review from cijothomas January 6, 2026 18:12
@cijothomas
Copy link
Member

@psandana Could you take a look as well before merge?

Copy link
Contributor

@psandana psandana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I would include a test that uses block_on() to prevent regressions.

@cijothomas
Copy link
Member

LGTM. I would include a test that uses block_on() to prevent regressions.

@berkus merging now. Would you send a follow up to add a test @psandana recommended? I think its an important test to prove that this indeed fixes the issue.

@cijothomas cijothomas merged commit 41a0933 into open-telemetry:main Jan 6, 2026
22 checks passed
@berkus
Copy link
Contributor Author

berkus commented Jan 7, 2026

Yep, will add a test promptly.

@berkus berkus deleted the refactor/switch-etw-exporter-to-processor branch January 7, 2026 12:09
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.

[Bug]: opentelemetry_etw_logs::Processor::emit panics if called from another block_on (EnterError)

3 participants