-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add ForceFlush method to TracerProvider #1608
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The specification requires that a TracerProvider have a ForceFlush method that can be set with a timeout, return any error to the caller, and have all the registered span processors export their spans. This updates the SpanProcessor.ForceFlush method to accept a context and return an error and plumbs this method into a new ForceFlush method of the SDK TracerProvider. Additionally, this corrects the TracerProvider Shutdown method. This method as well needs to return to the caller any failure it encounters according to the specification. This returns an error if it cannot type assert the spanProcessorStates or if shutting down a span processor results in an error. Resolves open-telemetry#1606
MrAlias
added
pkg:SDK
Related to an SDK package
area:trace
Part of OpenTelemetry tracing
release:required-for-ga
labels
Feb 26, 2021
MrAlias
requested review from
Aneurysm9,
dashpole,
evantorrie and
jmacd
as code owners
February 26, 2021 01:44
Codecov Report
@@ Coverage Diff @@
## main #1608 +/- ##
=======================================
- Coverage 77.4% 77.1% -0.3%
=======================================
Files 128 128
Lines 6705 6736 +31
=======================================
+ Hits 5192 5197 +5
- Misses 1266 1288 +22
- Partials 247 251 +4
|
seh
reviewed
Feb 26, 2021
seh
reviewed
Feb 26, 2021
Co-authored-by: Steven E. Harris <seh@panix.com>
…into tp-force-flush
seh
reviewed
Feb 26, 2021
jmacd
approved these changes
Mar 2, 2021
Aneurysm9
approved these changes
Mar 5, 2021
Merged
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The specification requires that a TracerProvider have a ForceFlush method that can be set with a timeout, return any error to the caller, and have all the registered span processors export their spans. This updates the SpanProcessor.ForceFlush method to accept a context and return an error and plumbs this method into a new ForceFlush method of the SDK TracerProvider.
Additionally, this corrects the TracerProvider Shutdown method. This method as well needs to return to the caller any failure it encounters according to the specification. This returns an error if it cannot type assert the spanProcessorStates or if shutting down a span processor results in an error.
Part of #1606