From 3af484eda33e7d216a213efd4113a9187ab5e088 Mon Sep 17 00:00:00 2001 From: Alan West <3676547+alanwest@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:18:49 -0700 Subject: [PATCH] Use TokioCurrentThread to make ctrl-c work --- getting-started-guides/rust/Cargo.toml | 2 +- getting-started-guides/rust/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/getting-started-guides/rust/Cargo.toml b/getting-started-guides/rust/Cargo.toml index 1cd3d021..6ff3f895 100644 --- a/getting-started-guides/rust/Cargo.toml +++ b/getting-started-guides/rust/Cargo.toml @@ -8,6 +8,6 @@ actix-web = "4.8.0" actix-web-opentelemetry = "0.19.0" opentelemetry = "0.24.0" opentelemetry-otlp = { version = "0.17.0", features = ["tls-roots", "gzip-tonic"] } -opentelemetry_sdk = { version = "0.24.1", features = ["rt-tokio"] } +opentelemetry_sdk = { version = "0.24.1", features = ["rt-tokio-current-thread"] } serde = { version = "1.0.205", features = ["derive"] } tonic = "0.12.1" diff --git a/getting-started-guides/rust/src/main.rs b/getting-started-guides/rust/src/main.rs index 7a95777a..59754b83 100644 --- a/getting-started-guides/rust/src/main.rs +++ b/getting-started-guides/rust/src/main.rs @@ -94,7 +94,7 @@ async fn main() -> std::io::Result<()> { .with_exporter(opentelemetry_otlp::new_exporter().tonic() .with_tls_config(tonic::transport::ClientTlsConfig::new().with_native_roots())) .with_trace_config(Config::default().with_resource(resource)) - .install_batch(runtime::Tokio) + .install_batch(runtime::TokioCurrentThread) .expect("failed to initialize the trace pipeline"); global::set_tracer_provider(tracer_provider);