diff --git a/libs/@local/tracing/src/opentelemetry.rs b/libs/@local/tracing/src/opentelemetry.rs index b0d99ceb758..db97952b644 100644 --- a/libs/@local/tracing/src/opentelemetry.rs +++ b/libs/@local/tracing/src/opentelemetry.rs @@ -72,16 +72,13 @@ where // - OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT // - OTEL_SPAN_EVENT_COUNT_LIMIT // - OTEL_SPAN_LINK_COUNT_LIMIT - let trace_config = trace::Config::default() + let tracer = trace::TracerProvider::builder() + .with_batch_exporter(exporter, runtime::Tokio) .with_sampler(Sampler::ParentBased(Box::new(Sampler::TraceIdRatioBased( 0.1, )))) .with_id_generator(RandomIdGenerator::default()) - .with_resource(Resource::new(vec![KeyValue::new("service.name", "graph")])); - - let tracer = trace::TracerProvider::builder() - .with_batch_exporter(exporter, runtime::Tokio) - .with_config(trace_config) + .with_resource(Resource::new(vec![KeyValue::new("service.name", "graph")])) .build() .tracer("graph");