mirror of
https://github.com/actix/examples
synced 2025-06-26 17:17:42 +02:00
fix: flush and shutdown global tracer on exit
This commit is contained in:
@ -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(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user