mirror of
https://github.com/actix/examples
synced 2024-11-23 14:31:07 +01:00
fix: flush and shutdown global tracer on exit
This commit is contained in:
parent
1bae92b0fb
commit
6334049545
@ -28,5 +28,13 @@ async fn main() -> io::Result<()> {
|
||||
.workers(2)
|
||||
.bind(("127.0.0.1", 8080))?
|
||||
.run()
|
||||
.await?;
|
||||
|
||||
actix_web::web::block(move || {
|
||||
opentelemetry::global::shutdown_tracer_provider();
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user