Skip to content

Commit

Permalink
chore: Update OTEL patch version and remove a deprecated fn call (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
spencewenski authored Dec 1, 2024
1 parent 9bbf449 commit acd5fc1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tracing = { workspace = true }
tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json"] }
opentelemetry-semantic-conventions = "0.27.0"
opentelemetry = { version = "0.27.0", features = ["trace", "metrics", "logs"], optional = true }
opentelemetry_sdk = { version = "0.27.0", features = ["tokio", "rt-tokio", "metrics", "logs", "trace"], optional = true }
opentelemetry_sdk = { version = "0.27.1", features = ["tokio", "rt-tokio", "metrics", "logs", "trace"], optional = true }
opentelemetry-otlp = { version = "0.27.0", features = ["metrics", "trace", "logs"], optional = true }
# Roadster technically doesn't need a direct dependency on `prost`, but we add one here to allow our
# `cargo minimal-versions check` check to pass -- `opentelemetry-proto` requires version `0.13.2` or higher
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ check-docs:
RUSTDOCFLAGS="-D rustdoc::all -A rustdoc::private_intra_doc_links" cargo doc --all-features --no-deps

check-msrv:
cargo minimal-versions check --direct --all-features --no-dev-deps
cargo minimal-versions check --direct --all-features

# Run a suite of checks. These checks are fairly comprehensive and will catch most issues. However, they are still less than what is run in CI.
check: check-fmt check-no-features check-default-features check-all-features check-docs check-msrv
Expand Down
4 changes: 1 addition & 3 deletions src/tracing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ use opentelemetry_sdk::propagation::TraceContextPropagator;
#[cfg(feature = "otel")]
use opentelemetry_sdk::runtime::Tokio;
#[cfg(feature = "otel")]
use opentelemetry_sdk::trace::Config;
#[cfg(feature = "otel")]
use opentelemetry_semantic_conventions::resource::{SERVICE_NAME, SERVICE_VERSION};
use std::str::FromStr;
use tracing::Level;
Expand Down Expand Up @@ -120,7 +118,7 @@ pub fn init_tracing(
.with_endpoint(otlp_endpoint.to_string())
.build()?;
let provider = opentelemetry_sdk::trace::TracerProvider::builder()
.with_config(Config::default().with_resource(otel_resource.clone()))
.with_resource(otel_resource.clone())
.with_batch_exporter(exporter, Tokio)
.build();
opentelemetry::global::set_tracer_provider(provider.clone());
Expand Down

0 comments on commit acd5fc1

Please sign in to comment.