Skip to content

Upgrade to opentelemetry 0.25 #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# [Unreleased]

### Breaking Changes

- Upgrade to opentelemetry 0.25. Refer to the upstream
[changelog](https://github.com/open-telemetry/opentelemetry-rust/releases/tag/opentelemetry-0.25.0)
for more information.

# 0.25.0 (July 21, 2024)

### Breaking Changes
Expand Down
16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tracing-opentelemetry"
version = "0.25.0"
version = "0.26.0"
description = "OpenTelemetry integration for tracing"
homepage = "https://github.com/tokio-rs/tracing-opentelemetry"
repository = "https://github.com/tokio-rs/tracing-opentelemetry"
Expand All @@ -23,8 +23,8 @@ metrics = ["opentelemetry/metrics","opentelemetry_sdk/metrics", "smallvec"]
metrics_gauge_unstable = ["opentelemetry/otel_unstable"]

[dependencies]
opentelemetry = { version = "0.24", default-features = false, features = ["trace"] }
opentelemetry_sdk = { version = "0.24.1", default-features = false, features = ["trace"] }
opentelemetry = { version = "0.25", default-features = false, features = ["trace"] }
opentelemetry_sdk = { version = "0.25.0", default-features = false, features = ["trace"] }
tracing = { version = "0.1.35", default-features = false, features = ["std"] }
tracing-core = "0.1.28"
tracing-subscriber = { version = "0.3.0", default-features = false, features = ["registry", "std"] }
Expand All @@ -41,11 +41,11 @@ smallvec = { version = "1.0", optional = true }
[dev-dependencies]
async-trait = "0.1.56"
criterion = { version = "0.5.1", default-features = false, features = ["html_reports"] }
opentelemetry = { version = "0.24", features = ["trace", "metrics"] }
opentelemetry_sdk = { version = "0.24", default-features = false, features = ["trace", "rt-tokio"] }
opentelemetry-stdout = { version = "0.5", features = ["trace", "metrics"] }
opentelemetry-otlp = { version = "0.17", features = ["metrics"] }
opentelemetry-semantic-conventions = "0.16"
opentelemetry = { version = "0.25", features = ["trace", "metrics"] }
opentelemetry_sdk = { version = "0.25", default-features = false, features = ["trace", "rt-tokio"] }
opentelemetry-stdout = { version = "0.25", features = ["trace", "metrics"] }
opentelemetry-otlp = { version = "0.25", features = ["metrics"] }
opentelemetry-semantic-conventions = "0.25"
futures-util = { version = "0.3.17", default-features = false }
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1"
Expand Down
4 changes: 2 additions & 2 deletions examples/opentelemetry-otlp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use opentelemetry_sdk::{
Resource,
};
use opentelemetry_semantic_conventions::{
resource::{DEPLOYMENT_ENVIRONMENT, SERVICE_NAME, SERVICE_VERSION},
resource::{DEPLOYMENT_ENVIRONMENT_NAME, SERVICE_NAME, SERVICE_VERSION},
SCHEMA_URL,
};
use tracing_core::Level;
Expand All @@ -22,7 +22,7 @@ fn resource() -> Resource {
[
KeyValue::new(SERVICE_NAME, env!("CARGO_PKG_NAME")),
KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")),
KeyValue::new(DEPLOYMENT_ENVIRONMENT, "develop"),
KeyValue::new(DEPLOYMENT_ENVIRONMENT_NAME, "develop"),
],
SCHEMA_URL,
)
Expand Down
4 changes: 2 additions & 2 deletions src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ where
/// exceptions][conv].
///
/// * Only events without a message field (unnamed events) and at least one field with the name error
/// are considered for mapping.
/// are considered for mapping.
///
/// By default, these events are mapped.
///
Expand Down Expand Up @@ -1693,7 +1693,7 @@ mod tests {
let context = tracing_error::SpanTrace::capture();

// This can cause a deadlock if `on_record` locks extensions while attributes are visited
span.record("exception", &tracing::field::debug(&context));
span.record("exception", tracing::field::debug(&context));
// This can cause a deadlock if `on_event` locks extensions while the event is visited
tracing::info!(exception = &tracing::field::debug(&context), "hello");
});
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
//! special fields are:
//!
//! * `otel.name`: Override the span name sent to OpenTelemetry exporters.
//! Setting this field is useful if you want to display non-static information
//! in your span name.
//! Setting this field is useful if you want to display non-static information
//! in your span name.
//! * `otel.kind`: Set the span kind to one of the supported OpenTelemetry [span kinds].
//! * `otel.status_code`: Set the span status code to one of the supported OpenTelemetry [span status codes].
//! * `otel.status_message`: Set the span status message.
Expand Down
Loading
Loading