chore(tvix): upgrade to tonic 0.12 / hyper 1.0
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
This commit is contained in:
parent
1515a970be
commit
ca8e2b9fbf
15 changed files with 1840 additions and 751 deletions
|
|
@ -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 }
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue