From 477d793383105be57207ea13c9b6ff6e9243fdb2 Mon Sep 17 00:00:00 2001 From: Mari Date: Thu, 25 Jul 2024 15:10:33 +0200 Subject: [PATCH] update example also to new otel version --- examples/exemplars-tracing-opentelemetry/Cargo.toml | 7 ++++--- examples/exemplars-tracing-opentelemetry/src/main.rs | 4 ++-- examples/opentelemetry-push-custom/Cargo.toml | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/exemplars-tracing-opentelemetry/Cargo.toml b/examples/exemplars-tracing-opentelemetry/Cargo.toml index 93fae54..136f645 100644 --- a/examples/exemplars-tracing-opentelemetry/Cargo.toml +++ b/examples/exemplars-tracing-opentelemetry/Cargo.toml @@ -12,10 +12,11 @@ autometrics = { path = "../../autometrics", features = [ ] } autometrics-example-util = { path = "../util" } axum = { version = "0.7.2", features = ["json"] } -opentelemetry = "0.20" -opentelemetry-stdout = { version = "0.1", features = ["trace"] } +opentelemetry = "0.24" +opentelemetry_sdk = "0.24" +opentelemetry-stdout = { version = "0.5", features = ["trace"] } reqwest = { version = "0.11", features = ["json"] } tokio = { version = "1", features = ["full"] } tracing = "0.1" -tracing-opentelemetry = "0.21" +tracing-opentelemetry = "0.25" tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/examples/exemplars-tracing-opentelemetry/src/main.rs b/examples/exemplars-tracing-opentelemetry/src/main.rs index 367d6ce..9ed7b9a 100644 --- a/examples/exemplars-tracing-opentelemetry/src/main.rs +++ b/examples/exemplars-tracing-opentelemetry/src/main.rs @@ -1,7 +1,7 @@ use autometrics::{autometrics, prometheus_exporter}; use autometrics_example_util::run_prometheus; -use axum::{routing::get, Router, ServiceExt}; -use opentelemetry::sdk::trace::TracerProvider; +use axum::{routing::get, Router}; +use opentelemetry_sdk::trace::TracerProvider; use opentelemetry::trace::TracerProvider as _; use opentelemetry_stdout::SpanExporter; use std::error::Error; diff --git a/examples/opentelemetry-push-custom/Cargo.toml b/examples/opentelemetry-push-custom/Cargo.toml index 22f6c06..08e20d4 100644 --- a/examples/opentelemetry-push-custom/Cargo.toml +++ b/examples/opentelemetry-push-custom/Cargo.toml @@ -12,5 +12,5 @@ autometrics-example-util = { path = "../util" } opentelemetry = { version = "0.24", features = ["metrics"] } opentelemetry_sdk = { version = "0.24", features = ["metrics", "rt-tokio"] } opentelemetry-otlp = { version = "0.17", features = ["tonic", "metrics"] } -opentelemetry-semantic-conventions = { version = "0.13" } +opentelemetry-semantic-conventions = { version = "0.16.0" } tokio = { version = "1", features = ["full"] }