Skip to content

Commit

Permalink
Fix Rust example (#681)
Browse files Browse the repository at this point in the history
* Update to actix-web-opentelemetry v0.19.0

* Use TokioCurrentThread to make ctrl-c work
  • Loading branch information
alanwest authored Sep 30, 2024
1 parent 54e46f7 commit 65b286f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
32 changes: 9 additions & 23 deletions getting-started-guides/rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions getting-started-guides/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ edition = "2021"

[dependencies]
actix-web = "4.8.0"
actix-web-opentelemetry = "0.18.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"
2 changes: 1 addition & 1 deletion getting-started-guides/rust/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 65b286f

Please sign in to comment.