Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk/trace: Fix gorountine leak in batchSpanProcessor.ForceFlush #6369

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

pellared
Copy link
Member

@pellared pellared commented Feb 25, 2025

Fixes #6360

Per #6360 (comment):

So I'd fix this issue with the first proposed solution, and open an issue to change the behavior in a separate PR.

$ go test -run=TestBatchSpanProcessorForceFlushTimeout -count=1000
PASS
ok      go.opentelemetry.io/otel/sdk/trace      1.701s
$ go test -run=TestBatchSpanProcessorForceFlushTimeout -count=1000 -race
PASS
ok      go.opentelemetry.io/otel/sdk/trace      4.056s

@peterbourgon, thank you for your contribution 🏅

@pellared pellared changed the title sdk/trace: Remove gorountine leak in batchSpanProcessor.ForceFlush quickfix sdk/trace: Remove gorountine leak in batchSpanProcessor.ForceFlush Feb 25, 2025
@pellared
Copy link
Member Author

@open-telemetry/go-approvers, ready for review. The tests should pass after #6368 is merged.

@pellared pellared changed the title sdk/trace: Remove gorountine leak in batchSpanProcessor.ForceFlush sdk/trace: Fix gorountine leak in batchSpanProcessor.ForceFlush Feb 25, 2025
@pellared pellared changed the title sdk/trace: Fix gorountine leak in batchSpanProcessor.ForceFlush sdk/trace: Fix gorountine leak in batchSpanProcessor.ForceFlush Feb 25, 2025
@XSAM XSAM added this to the v1.35.0 milestone Feb 26, 2025
Copy link
Member

@XSAM XSAM left a comment

Choose a reason for hiding this comment

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

👍

@pellared pellared marked this pull request as ready for review February 26, 2025 22:52
@pellared
Copy link
Member Author

Tests are passing.

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.8%. Comparing base (44d5045) to head (58e082f).

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #6369   +/-   ##
=====================================
  Coverage   81.8%   81.8%           
=====================================
  Files        283     283           
  Lines      24900   24899    -1     
=====================================
  Hits       20392   20392           
+ Misses      4105    4104    -1     
  Partials     403     403           

see 3 files with indirect coverage changes

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.

batchSpanProcessor.ForceFlush can leak a goroutine
2 participants