Skip to content

fix data race in BatchedSpanProcessor #518

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

Merged
merged 5 commits into from
Mar 5, 2020

Conversation

rghetia
Copy link
Contributor

@rghetia rghetia commented Mar 5, 2020

@rghetia rghetia added the hold label Mar 5, 2020
@rghetia rghetia changed the title fix data race in BatchedSpanProcessor WIP: fix data race in BatchedSpanProcessor Mar 5, 2020
rghetia added 2 commits March 4, 2020 23:53

Verified

This commit was signed with the committer’s verified signature. The key has expired.
MikeGoldsmith Mike Goldsmith
@rghetia rghetia changed the title WIP: fix data race in BatchedSpanProcessor fix data race in BatchedSpanProcessor Mar 5, 2020
@rghetia rghetia removed the hold label Mar 5, 2020
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

One questions about the WaitGroup location, but nothing blocking.

}
tp.RegisterSpanProcessor(ssp)
tr := tp.Tracer("BatchSpanProcessorWithOptions")

generateSpan(t, tr, option)
wg := &sync.WaitGroup{}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason the WaitGroup isn't created and handled in generateSpan itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there is no reason. Moved it to generateSpan.

@rghetia rghetia merged commit 79de90a into open-telemetry:master Mar 5, 2020
MikeGoldsmith pushed a commit to MikeGoldsmith/opentelemetry-go that referenced this pull request Mar 13, 2020
* fix data race in BatchedSpanProcessor

- fixes open-telemetry#517

* fix ci.

* fix another test.

* move wait group to generateSpan func.
@pellared pellared added this to the untracked milestone Nov 8, 2024
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.

data race in BatchedSpanProcessor
4 participants