You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
opentelemetry = { version = "0.22.0", default-features = false, features = [
"trace",
] }
opentelemetry-http = { version = "0.11.1", default-features = false }
opentelemetry-otlp = { version = "0.15.0", default-features = false, features = [
"http-proto",
] }
opentelemetry_sdk = { version = "0.22", default-features = false, features = [
"rt-tokio",
] }
I'm using:
let otlp_tracer = opentelemetry_otlp::new_pipeline().tracing().with_exporter(exporter).with_trace_config(trace::config().with_resource(Resource::new(vec![KeyValue::new("service.name", service_name.to_string()),
]))).with_batch_config(
trace::BatchConfigBuilder::default().with_max_export_batch_size(10_000).with_max_queue_size(30_000).with_scheduled_delay(Duration::from_millis(5_000)).build(),).install_batch(opentelemetry_sdk::runtime::Tokio).unwrap();let layer = tracing_opentelemetry::layer().with_tracer(otlp_tracer).with_filter(EnvFilter::from("info")).boxed();
and it works.
Now with these deps:
opentelemetry = { version = "0.23.0", default-features = false, features = [
"trace",
] }
opentelemetry-http = { version = "0.12.0", default-features = false }
opentelemetry-otlp = { version = "0.16.0", default-features = false, features = [
"http-proto",
] }
opentelemetry_sdk = { version = "0.23", default-features = false, features = [
"rt-tokio",
] }
I'm getting this error:
error[E0277]: the trait bound `opentelemetry_sdk::trace::Tracer: opentelemetry::trace::tracer::Tracer` is not satisfied
|
91 | .with_tracer(otlp_tracer)
| ----------- ^^^^^^^^^^^ the trait `opentelemetry::trace::tracer::Tracer` is not implemented for `opentelemetry_sdk::trace::Tracer`
| |
| required by a bound introduced by this call
|
= help: the following other types implement trait `opentelemetry::trace::tracer::Tracer`:
opentelemetry::global::trace::BoxedTracer
opentelemetry_sdk::trace::tracer::Tracer
opentelemetry::trace::noop::NoopTracer
note: required by a bound in `tracing_opentelemetry::OpenTelemetryLayer::<S, T>::with_tracer`
--> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tracing-opentelemetry-0.23.0\src\layer.rs:581:17
|
579 | pub fn with_tracer<Tracer>(self, tracer: Tracer) -> OpenTelemetryLayer<S, Tracer>
| ----------- required by a bound in this associated function
580 | where
581 | Tracer: otel::Tracer + PreSampledTracer + 'static,
| ^^^^^^^^^^^^ required by this bound in `OpenTelemetryLayer::<S, T>::with_tracer`
There are already open PRs in #131 and #139 to update. For now, you cannot update your opentelemetry dependencies if you want to use tracing-opentelemetry
If keeping this up to date is so important to you, I'd be happy to sell you commercial support. If not, please don't open/comment on issues within 2 workdays after an upstream release.
With these deps:
I'm using:
and it works.
Now with these deps:
I'm getting this error:
How can I fix?
From open-telemetry/opentelemetry-rust#1779.
The text was updated successfully, but these errors were encountered: