mirror of
https://github.com/actix/examples
synced 2025-02-20 00:14:21 +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)
|
.workers(2)
|
||||||
.bind(("127.0.0.1", 8080))?
|
.bind(("127.0.0.1", 8080))?
|
||||||
.run()
|
.run()
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
actix_web::web::block(move || {
|
||||||
|
opentelemetry::global::shutdown_tracer_provider();
|
||||||
|
})
|
||||||
.await
|
.await
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user