Skip to content

Commit

Permalink
Use TokioCurrentThread runtime for otel trace batching
Browse files Browse the repository at this point in the history
  • Loading branch information
danieljharvey committed Sep 19, 2023
1 parent 654f791 commit f118433
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rust-connector-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ clap = { version = "^4.3.9", features = ["derive", "env"] }
ndc-client = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.0-rc.5" }
ndc-test = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.0-rc.5" }
opentelemetry = { version = "^0.20", features = [
"rt-tokio",
"rt-tokio-current-thread",
"trace",
], default-features = false }
opentelemetry_api = "^0.20.0"
Expand Down
2 changes: 1 addition & 1 deletion rust-connector-sdk/src/default_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ fn init_tracing(serve_command: &ServeCommand) -> Result<(), Box<dyn Error>> {
]))
.with_sampler(Sampler::ParentBased(Box::new(Sampler::AlwaysOn))),
)
.install_batch(opentelemetry::runtime::Tokio)?;
.install_batch(opentelemetry::runtime::TokioCurrentThread)?;

tracing_subscriber::registry()
.with(
Expand Down

0 comments on commit f118433

Please sign in to comment.