Skip to content
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
121 changes: 0 additions & 121 deletions tracing-futures/src/executor/futures_preview.rs

This file was deleted.

5 changes: 0 additions & 5 deletions tracing-futures/src/executor/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#[cfg(feature = "futures-01")]
mod futures_01;

#[cfg(feature = "futures_preview")]
mod futures_preview;
#[cfg(feature = "futures_preview")]
pub use self::futures_preview::*;

#[cfg(feature = "futures-03")]
mod futures_03;
#[cfg(feature = "futures-03")]
Expand Down
14 changes: 7 additions & 7 deletions tracing-subscriber/src/filter/env/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ impl Builder {
}

if !disabled.is_empty() {
#[cfg(feature = "nu_ansi_term")]
#[cfg(feature = "nu-ansi-term")]
use nu_ansi_term::{Color, Style};
// NOTE: We can't use a configured `MakeWriter` because the EnvFilter
// has no knowledge of any underlying subscriber or collector, which
// may or may not use a `MakeWriter`.
let warn = |msg: &str| {
#[cfg(not(feature = "nu_ansi_term"))]
#[cfg(not(feature = "nu-ansi-term"))]
let msg = format!("warning: {}", msg);
#[cfg(feature = "nu_ansi_term")]
#[cfg(feature = "nu-ansi-term")]
let msg = {
let bold = Style::new().bold();
let mut warning = Color::Yellow.paint("warning");
Expand All @@ -228,9 +228,9 @@ impl Builder {
eprintln!("{}", msg);
};
let ctx_prefixed = |prefix: &str, msg: &str| {
#[cfg(not(feature = "nu_ansi_term"))]
#[cfg(not(feature = "nu-ansi-term"))]
let msg = format!("{} {}", prefix, msg);
#[cfg(feature = "nu_ansi_term")]
#[cfg(feature = "nu-ansi-term")]
let msg = {
let mut equal = Color::Fixed(21).paint("="); // dark blue
equal.style_ref_mut().is_bold = true;
Expand All @@ -241,9 +241,9 @@ impl Builder {
let ctx_help = |msg| ctx_prefixed("help:", msg);
let ctx_note = |msg| ctx_prefixed("note:", msg);
let ctx = |msg: &str| {
#[cfg(not(feature = "nu_ansi_term"))]
#[cfg(not(feature = "nu-ansi-term"))]
let msg = format!("note: {}", msg);
#[cfg(feature = "nu_ansi_term")]
#[cfg(feature = "nu-ansi-term")]
let msg = {
let mut pipe = Color::Fixed(21).paint("|");
pipe.style_ref_mut().is_bold = true;
Expand Down
4 changes: 2 additions & 2 deletions tracing-subscriber/tests/field_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use tracing_mock::*;
use tracing_subscriber::{filter::EnvFilter, prelude::*};

#[test]
#[cfg_attr(not(flaky_tests), ignore)]
#[ignore] // flaky, use `cargo test -- --ignored` or `--include-ignored` to run
fn field_filter_events() {
let filter: EnvFilter = "[{thing}]=debug".parse().expect("filter should parse");
let (subscriber, finished) = collector::mock()
Expand Down Expand Up @@ -35,7 +35,7 @@ fn field_filter_events() {
}

#[test]
#[cfg_attr(not(flaky_tests), ignore)]
#[ignore] // flaky, use `cargo test -- --ignored` or `--include-ignored` to run
fn field_filter_spans() {
let filter: EnvFilter = "[{enabled=true}]=debug"
.parse()
Expand Down
25 changes: 0 additions & 25 deletions tracing-tower/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,33 +71,8 @@ where
}
}

#[cfg(feature = "tower-util")]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These could be migrated to tower_make instead, see #2971

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, see the commit description for why I didn't do that.

#[cfg_attr(docsrs, doc(cfg(feature = "tower-util")))]
pub trait InstrumentMake<T, R>
where
Self: tower_util::MakeService<T, R> + Sized,
{
fn with_traced_service<G>(self, get_span: G) -> service_span::MakeService<Self, T, R, G>
where
G: GetSpan<T>,
{
service_span::MakeService::new(self, get_span)
}

fn with_traced_requests<G>(self, get_span: G) -> request_span::MakeService<Self, R, G>
where
G: GetSpan<R> + Clone,
{
request_span::MakeService::new(self, get_span)
}
}

impl<S, R> InstrumentableService<R> for S where S: Service<R> + Sized {}

#[cfg(feature = "tower-util")]
#[cfg_attr(docsrs, doc(cfg(feature = "tower-util")))]
impl<M, T, R> InstrumentMake<T, R> for M where M: tower_util::MakeService<T, R> {}

pub trait GetSpan<T>: crate::sealed::Sealed<T> {
fn span_for(&self, target: &T) -> tracing::Span;
}
Expand Down
4 changes: 0 additions & 4 deletions tracing-tower/src/service_span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ pub struct Service<S> {
#[cfg_attr(docsrs, doc(cfg(feature = "tower-layer")))]
pub use self::layer::*;

#[cfg(feature = "tower-util")]
#[cfg_attr(docsrs, doc(cfg(feature = "tower-util")))]
pub use self::make::MakeService;

#[cfg(feature = "tower-layer")]
#[cfg_attr(docsrs, doc(cfg(feature = "tower-layer")))]
mod layer {
Expand Down