-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(telemetry): ensure tracer providers are shut down in all services (…
…#1098) ## Summary Calls `opentelemetry::global::shutdown_tracer_providers` upon exiting services ## Background Because OTLP is pushed-based, users must ensure that all spans are flushed and sent to the OTLP endpoint. Note that `opentelemetry::global::shutdown_trace_providers` is a blocking operation and can potentially stall a service from exiting. We must observe if this actually ends up being a problem in practice. ## Changes - Add a drop guard as the return value of `astria_telemetry::Config::try_init`, which in turns calls `opentelemetry::global::shutdown_trace_providers` on drop ## Testing Happens outside of testable code. Must be observed on devnet/in production.
- Loading branch information
1 parent
ca9c22b
commit 691888b
Showing
5 changed files
with
49 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
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
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