diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fb43d5..07aebcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# 0.18.0 (September 18, 2022) + +### Breaking Changes + +- Upgrade to `v0.18.0` of `opentelemetry` ([#2303]) + For list of breaking changes in OpenTelemetry, see the + [v0.18.0 changelog](https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry/CHANGELOG.md#v0180). + +### Fixed + +- `on_event` respects event's explicit parent ([#2296]) + +Thanks to @wprzytula for contributing to this release! + # 0.17.4 (July 1, 2022) This release adds optional support for recording `std::error::Error`s using diff --git a/Cargo.toml b/Cargo.toml index f04b99c..a705b57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tracing-opentelemetry" -version = "0.17.4" +version = "0.18.0" authors = [ "Julian Tescher ", "Tokio Contributors " @@ -40,11 +40,10 @@ thiserror = { version = "1.0.31", optional = true } async-trait = "0.1.56" criterion = { version = "0.3.6", default-features = false } opentelemetry-jaeger = "0.17.0" -tracing = { version = "0.1.35", default-features = false, features = ["std", "attributes"] } -tracing-subscriber = { version = "0.3.0", default-features = false, features = ["registry", "std"] } futures-util = { version = "0.3", default-features = false } tokio = { version = "1", features = ["full"] } tokio-stream = "0.1" +tracing = { version = "0.1.35", default-features = false, features = ["std", "attributes"] } [lib] bench = false diff --git a/README.md b/README.md index 9260d80..4ccbb4a 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,9 @@ Utilities for adding [OpenTelemetry] interoperability to [`tracing`]. [Documentation][docs-url] | [Chat][discord-url] [crates-badge]: https://img.shields.io/crates/v/tracing-opentelemetry.svg -[crates-url]: https://crates.io/crates/tracing-opentelemetry/0.17.4 +[crates-url]: https://crates.io/crates/tracing-opentelemetry/0.18.0 [docs-badge]: https://docs.rs/tracing-opentelemetry/badge.svg -[docs-url]: https://docs.rs/tracing-opentelemetry/0.17.4/tracing_opentelemetry +[docs-url]: https://docs.rs/tracing-opentelemetry/0.18.0/tracing_opentelemetry [docs-master-badge]: https://img.shields.io/badge/docs-master-blue [docs-master-url]: https://tracing-rs.netlify.com/tracing_opentelemetry [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg diff --git a/src/layer.rs b/src/layer.rs index 8e6424b..f4a3057 100644 --- a/src/layer.rs +++ b/src/layer.rs @@ -77,7 +77,7 @@ where // // See https://github.com/tokio-rs/tracing/blob/4dad420ee1d4607bad79270c1520673fa6266a3d/tracing-error/src/layer.rs pub(crate) struct WithContext( - #[allow(clippy::type_complexity)] // who cares + #[allow(clippy::type_complexity)] fn(&tracing::Dispatch, &span::Id, f: &mut dyn FnMut(&mut OtelData, &dyn PreSampledTracer)), ); @@ -971,7 +971,10 @@ fn thread_id_integer(id: thread::ThreadId) -> u64 { mod tests { use super::*; use crate::OtelData; - use opentelemetry::trace::{noop, TraceFlags}; + use opentelemetry::{ + trace::{noop, TraceFlags}, + StringValue, + }; use std::{ borrow::Cow, collections::HashMap, @@ -1093,16 +1096,6 @@ mod tests { tracing::subscriber::with_default(subscriber, || { tracing::debug_span!("static_name", otel.name = dynamic_name.as_str()); }); - let recorded_status = tracer - .0 - .lock() - .unwrap() - .as_ref() - .unwrap() - .builder - .status - .clone(); - assert_eq!(recorded_status, otel::Status::Unset); let recorded_name = tracer .0 diff --git a/src/lib.rs b/src/lib.rs index d3bc5bb..9f5dd1c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -100,7 +100,7 @@ //! [subscriber]: tracing_subscriber::subscribe #![deny(unreachable_pub)] #![cfg_attr(test, deny(warnings))] -#![doc(html_root_url = "https://docs.rs/tracing-opentelemetry/0.17.4")] +#![doc(html_root_url = "https://docs.rs/tracing-opentelemetry/0.18.0")] #![doc( html_logo_url = "https://raw.githubusercontent.com/tokio-rs/tracing/master/assets/logo-type.png", issue_tracker_base_url = "https://github.com/tokio-rs/tracing/issues/"