Skip to content

Wait for current tracer provider to shutdown when dropping telemetry#2191

Merged
garypen merged 6 commits intodevfrom
garypen/wait-for-tracer-shutdown
Dec 6, 2022
Merged

Wait for current tracer provider to shutdown when dropping telemetry#2191
garypen merged 6 commits intodevfrom
garypen/wait-for-tracer-shutdown

Conversation

@garypen
Copy link
Contributor

@garypen garypen commented Dec 1, 2022

We spawn a detached thread currently. That's probably not a good idea since the router may terminate before the thread terminates and that will likely cause spans to be lost.

Let's wait for the shutdown for up to 5 seconds in the drop and then print a warning message if there is an issue.

The figure of 5 seconds is not configurable, but could be made so in future if required.

We spawn a detached thread currently. That's probably not a good idea
since the router may terminate before the thread terminates and that
will likely cause spans to be lost.

Let's join the thread in the `drop` and then print a warning message if
there is an issue.
@garypen garypen requested review from BrynCooke and Geal December 1, 2022 16:58
@garypen garypen self-assigned this Dec 1, 2022
Gary Pennington added 3 commits December 2, 2022 10:51
@garypen garypen enabled auto-merge (squash) December 6, 2022 13:26
@garypen garypen merged commit 802a181 into dev Dec 6, 2022
@garypen garypen deleted the garypen/wait-for-tracer-shutdown branch December 6, 2022 13:42
@BrynCooke BrynCooke added this to the v1.6.0 milestone Dec 13, 2022
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.

4 participants