Skip to content

Commit

Permalink
subscriber: deprecate CurrentSpan (#1321)
Browse files Browse the repository at this point in the history
The `tracing-subscriber::CurrentSpan` should be deprecated in `v0.2.x`.

Related PR #1320. 

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
Folyd and hawkw committed Apr 30, 2021
1 parent 95fe9a3 commit 5e435b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tracing-subscriber/src/lib.rs
Expand Up @@ -160,10 +160,12 @@ pub use fmt::fmt;
use std::default::Default;
/// Tracks the currently executing span on a per-thread basis.
#[derive(Debug)]
#[deprecated(since = "0.2.18", note = "Will be removed in v0.3")]
pub struct CurrentSpan {
current: thread::Local<Vec<Id>>,
}

#[allow(deprecated)]
impl CurrentSpan {
/// Returns a new `CurrentSpan`.
pub fn new() -> Self {
Expand Down Expand Up @@ -194,6 +196,7 @@ impl CurrentSpan {
}
}

#[allow(deprecated)]
impl Default for CurrentSpan {
fn default() -> Self {
Self::new()
Expand Down

0 comments on commit 5e435b1

Please sign in to comment.