Skip to content
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

Backport v0.18 otel release changes #22

Merged
merged 1 commit into from
May 23, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tracing-opentelemetry"
version = "0.17.4"
version = "0.18.0"
authors = [
"Julian Tescher <julian@tescher.me>",
"Tokio Contributors <team@tokio.rs>"
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 5 additions & 12 deletions src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
);

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down