Reorder the destructor of members in LoggerProvider and TracerProvider#1245
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1245 +/- ##
==========================================
+ Coverage 92.29% 92.31% +0.03%
==========================================
Files 198 198
Lines 7273 7281 +8
==========================================
+ Hits 6712 6721 +9
+ Misses 561 560 -1
|
|
It's too late on my timezone. I will solve the failed jobs tomorrow. |
d9792f5 to
3b54c24
Compare
|
@owent could you please rebase? |
| // order of declaration is important here - instrumentation library should destroy after | ||
| // logger-context. | ||
| std::unique_ptr<instrumentationlibrary::InstrumentationLibrary> instrumentation_library_; | ||
| std::shared_ptr<LoggerContext> context_; |
There was a problem hiding this comment.
Is cyclic dependency still an issue here as it changes weak_ptr to shared_ptr?
There was a problem hiding this comment.
There is no cyclic dependency right now.It's only be hold in Logger and LoggerProvider and Logger is only hold by LoggerProvider.
| } | ||
|
|
||
| // Should only shutdown exporter ONCE. | ||
| if (!already_shutdown && exporter_ != nullptr) |
There was a problem hiding this comment.
Is showing down is going, later call to Shutdown will just return true even if the previous Shutdown has not been completed?
There was a problem hiding this comment.
Yes and thanks, it's definitely a problem.I add a mutex lock to prevent this.
…r. It's safe to shutdown multiple times.(Fix open-telemetry#1244) Signed-off-by: owentou <owentou@tencent.com>
…comparison of integer expressions of different signedness: 'int' and 'const long unsigned int' [-Wsign-compare]` Signed-off-by: owentou <owentou@tencent.com>
…nd `SimpleSpanProcessor` Signed-off-by: owentou <owentou@tencent.com>
Signed-off-by: owentou <owentou@tencent.com>
Signed-off-by: owentou <owentou@tencent.com>
+ Temporary fix the `Export()` may be called too many times when we shutdown or just wakeup worker thread once.This problem is completely fixed in open-telemetry#1209 but not merged yet. + Fix http client may has a different error code when our network is under a proxy.
Signed-off-by: owentou <owentou@tencent.com>
3b54c24 to
67963f1
Compare
Done |
…r. It's safe to shutdown multiple times.(Fix #1244)
Signed-off-by: owentou owentou@tencent.com
Fixes #1244
Changes
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes