Skip to content

Commit

Permalink
OpenTelemetry v0.23 support (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
abdolence authored May 29, 2024
1 parent 072d15b commit e08d7f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ path = "src/lib.rs"

[dependencies]
tracing = "0.1"
opentelemetry = { version = "0.22" }
opentelemetry_sdk = { version = "0.22", features = ["rt-tokio"] }
opentelemetry-semantic-conventions = { version = "0.14" }
opentelemetry = { version = "0.23" }
opentelemetry_sdk = { version = "0.23", features = ["rt-tokio"] }
opentelemetry-semantic-conventions = { version = "0.15" }
gcloud-sdk = { version = "0.24", features = ["google-devtools-cloudtrace-v2"] }
rvstruct = "0.3"
rsb_derive = "0.5"
Expand All @@ -36,8 +36,8 @@ async-trait = "0.1"

[dev-dependencies]
tokio = { version = "1", features = ["full"] }
opentelemetry = { version = "0.22" }
opentelemetry = { version = "0.23" }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter","registry"] }
tracing-opentelemetry = { version = "0.23" }
tracing-opentelemetry = { version = "0.24" }
cargo-husky = { version = "1.5", default-features = false, features = ["run-for-all", "prepush-hook", "run-cargo-fmt"] }
12 changes: 6 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ impl GcpCloudTraceExporterBuilder {
provider_builder
};
let provider = provider_builder.build();
let tracer = provider.versioned_tracer(
"opentelemetry-gcloud",
Some(env!("CARGO_PKG_VERSION")),
Some("https://opentelemetry.io/schemas/1.23.0"),
None,
);
let tracer = provider
.tracer_builder("opentelemetry-gcloud")
.with_version(env!("CARGO_PKG_VERSION"))
.with_schema_url("https://opentelemetry.io/schemas/1.23.0")
.build();

let _ = opentelemetry::global::set_tracer_provider(provider);
Ok(tracer)
}
Expand Down

0 comments on commit e08d7f8

Please sign in to comment.