From fde8271ae95f27aa6c70b5335d451e9b532f6a41 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Thu, 12 Dec 2024 01:14:44 -0800 Subject: [PATCH 1/3] update tracing version --- Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a6ed25e2d9..08adb732f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,9 @@ tonic = { version = "0.12.3", default-features = false } tonic-build = "0.12" tokio = { version = "1", default-features = false } tokio-stream = "0.1" -tracing = { version = "0.1", default-features = false } -tracing-core = { version = "0.1", default-features = false } +# Using `tracing 0.1.39` because it introduces the ability to set event names in macros, +# required for OpenTelemetry's internal logging macros. Falling back to 0.1.40 or later if unavailable. +tracing = { version = ">=0.1.39", default-features = false } +tracing-core = { version = ">=0.1.33", default-features = false } # tracing 0.1.40 needs tracing-core 0.1.33 and above tracing-subscriber = { version = "0.3", default-features = false } url = { version = "2.5.2", default-features = false } #https://github.com/servo/rust-url/issues/992 From 2a14a88940e90ef5db3cf36ad62bcf3cd7e1b7d3 Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Thu, 12 Dec 2024 01:28:08 -0800 Subject: [PATCH 2/3] update comment --- Cargo.toml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 08adb732f8..73907d7fd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,9 +44,10 @@ tonic = { version = "0.12.3", default-features = false } tonic-build = "0.12" tokio = { version = "1", default-features = false } tokio-stream = "0.1" -# Using `tracing 0.1.39` because it introduces the ability to set event names in macros, -# required for OpenTelemetry's internal logging macros. Falling back to 0.1.40 or later if unavailable. -tracing = { version = ">=0.1.39", default-features = false } -tracing-core = { version = ">=0.1.33", default-features = false } # tracing 0.1.40 needs tracing-core 0.1.33 and above +# Using `tracing 0.1.40` because 0.1.39 (which is yanked) introduces the ability to set event names in macros, +# required for OpenTelemetry's internal logging macros. +tracing = { version = ">=0.1.40", default-features = false } +# `tracing-core >=0.1.33` is required for compatibility with `tracing >=0.1.40`. +tracing-core = { version = ">=0.1.33", default-features = false } tracing-subscriber = { version = "0.3", default-features = false } url = { version = "2.5.2", default-features = false } #https://github.com/servo/rust-url/issues/992 From 1e486857083bf417a82a270608e23f99759bae5f Mon Sep 17 00:00:00 2001 From: Lalit Kumar Bhasin Date: Sun, 15 Dec 2024 08:29:33 -0800 Subject: [PATCH 3/3] update changelog --- opentelemetry-sdk/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opentelemetry-sdk/CHANGELOG.md b/opentelemetry-sdk/CHANGELOG.md index c1dc11f43a..06b5a76703 100644 --- a/opentelemetry-sdk/CHANGELOG.md +++ b/opentelemetry-sdk/CHANGELOG.md @@ -102,6 +102,9 @@ - Getter methods have been introduced to access field values. This change impacts custom exporter and processor developers by requiring updates to code that directly accessed LogRecord fields. They must now use the provided getter methods (e.g., `log_record.event_name()` instead of `log_record.event_name`). +- Upgrade the tracing crate used for internal logging to version 0.1.40 or later. This is necessary because the internal logging macros utilize the name field as +metadata, a feature introduced in version 0.1.40. [#2418](https://github.com/open-telemetry/opentelemetry-rust/pull/2418) + ## 0.27.1 Released 2024-Nov-27