Synchronized calls to Exporter::Export & Shutdown#1164
Merged
ThomsonTan merged 10 commits intoopen-telemetry:mainfrom Jan 5, 2022
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1164 +/- ##
==========================================
- Coverage 93.29% 93.29% -0.00%
==========================================
Files 174 174
Lines 6391 6402 +11
==========================================
+ Hits 5962 5972 +10
- Misses 429 430 +1
|
…down' of https://github.com/esigo/opentelemetry-cpp into Synchronized-calls-to-Exporter-Export-and-Exporter-Shutdown
lalitb
approved these changes
Jan 3, 2022
| const nostd::span<std::unique_ptr<sdk::trace::Recordable>> &spans) noexcept | ||
| { | ||
| if (is_shutdown_) | ||
| if (isShutdown()) |
Member
There was a problem hiding this comment.
Nit - not directly related to this PR, but while you are changing this piece of code, could you also add error logging wherever missing?
ThomsonTan
reviewed
Jan 3, 2022
|
|
||
| #include <opentelemetry/ext/http/client/http_client.h> | ||
| #include <opentelemetry/sdk/trace/exporter.h> | ||
| #include "opentelemetry/common/spin_lock_mutex.h" |
Contributor
There was a problem hiding this comment.
Use #include <> for consistency?
ThomsonTan
reviewed
Jan 3, 2022
| if (is_shutdown_) | ||
| if (isShutdown()) | ||
| { | ||
| OTEL_INTERNAL_LOG_ERROR("[Jaeger Trace Exporter] Export failed, exporter is shutdown"); |
Contributor
There was a problem hiding this comment.
Log the size of span to imply how many spans are lost?
ThomsonTan
reviewed
Jan 3, 2022
ThomsonTan
approved these changes
Jan 5, 2022
This was referenced Jan 25, 2022
Merged
This file contains hidden or 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
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.
Fixes #1158 (issue)
Changes
Protects
is_shutdown_read and writes usingopentelemetry::common::SpinLockMutex.For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes