diff options
author | Yureka <tvl@yuka.dev> | 2024-07-20T18·15+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-07-21T11·01+0000 |
commit | ca8e2b9fbf4e58416655f237db02a331d0bc1f3d (patch) | |
tree | 0c14bd4a21e5367600cc9d0bcda563a33a879538 /tvix/tracing | |
parent | 1515a970bedbb6d7b5e8f966dddd0d8fff9bb03c (diff) |
chore(tvix): upgrade to tonic 0.12 / hyper 1.0 r/8385
Change-Id: Idd8ce48869ddd869d51a10959b920f1290a8a9b3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11991 Autosubmit: yuka <yuka@yuka.dev> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/tracing')
-rw-r--r-- | tvix/tracing/Cargo.toml | 16 | ||||
-rw-r--r-- | tvix/tracing/src/lib.rs | 13 |
2 files changed, 15 insertions, 14 deletions
diff --git a/tvix/tracing/Cargo.toml b/tvix/tracing/Cargo.toml index db1626d26d52..cdcbf4968230 100644 --- a/tvix/tracing/Cargo.toml +++ b/tvix/tracing/Cargo.toml @@ -12,17 +12,17 @@ tracing-indicatif = "0.3.6" tokio = { version = "1.32.0" , features = ["sync", "rt"] } thiserror = "1.0.38" -tracing-opentelemetry = { version = "0.23.0", optional = true } -opentelemetry = { version = "0.22.0", optional = true } -opentelemetry-otlp = { version = "0.15.0", optional = true } -opentelemetry_sdk = { version = "0.22.1", features = ["rt-tokio"], optional = true } +tracing-opentelemetry = { git = "https://github.com/tokio-rs/tracing-opentelemetry", branch = "otel-0.24", version = "0.25.0", optional = true } +opentelemetry = { version = "0.24.0", optional = true } +opentelemetry-otlp = { version = "0.17.0", optional = true } +opentelemetry_sdk = { version = "0.24.1", features = ["rt-tokio"], optional = true } tracing-tracy = { version = "0.11.0", features = ["flush-on-exit"], optional = true } -opentelemetry-http = { version = "0.11.0", optional = true } +opentelemetry-http = { version = "0.13.0", optional = true } -tonic = { version = "0.11.0", optional = true } -http = { version = "0.2.11", optional = true } +tonic = { version = "0.12.0", optional = true } +http = { version = "1.1.0", optional = true } -reqwest-tracing = { version = "0.4.8", default-features = false, optional = true } +reqwest-tracing = { version = "0.5.0", default-features = false, optional = true } axum = { version = "0.7.5", optional = true } diff --git a/tvix/tracing/src/lib.rs b/tvix/tracing/src/lib.rs index 35fdcda5a88a..fa9723d8cecc 100644 --- a/tvix/tracing/src/lib.rs +++ b/tvix/tracing/src/lib.rs @@ -6,7 +6,10 @@ use tracing_indicatif::{filter::IndicatifFilter, writer, IndicatifLayer, Indicat use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter, Layer}; #[cfg(feature = "otlp")] -use opentelemetry::{trace::Tracer, KeyValue}; +use opentelemetry::{ + trace::{Tracer, TracerProvider}, + KeyValue, +}; #[cfg(feature = "otlp")] use opentelemetry_sdk::{ propagation::TraceContextPropagator, @@ -264,7 +267,7 @@ fn gen_otlp_tracer( impl Tracer + tracing_opentelemetry::PreSampledTracer, mpsc::Sender<Option<oneshot::Sender<()>>>, ) { - let tracer = opentelemetry_otlp::new_pipeline() + let tracer_provider = opentelemetry_otlp::new_pipeline() .tracing() .with_exporter(opentelemetry_otlp::new_exporter().tonic()) .with_batch_config( @@ -281,7 +284,7 @@ fn gen_otlp_tracer( .with_scheduled_delay(std::time::Duration::from_secs(10)) .build(), ) - .with_trace_config(opentelemetry_sdk::trace::config().with_resource({ + .with_trace_config(opentelemetry_sdk::trace::Config::default().with_resource({ // use SdkProvidedResourceDetector.detect to detect resources, // but replace the default service name with our default. // https://github.com/open-telemetry/opentelemetry-rust/issues/1298 @@ -302,9 +305,7 @@ fn gen_otlp_tracer( // Trace provider is need for later use like flushing the provider. // Needs to be kept around for each message to rx we need to handle. - let tracer_provider = tracer - .provider() - .expect("Failed to get the tracer provider"); + let tracer = tracer_provider.tracer("tvix"); // Set up a channel for flushing trace providers later let (tx, mut rx) = mpsc::channel::<Option<oneshot::Sender<()>>>(16); |