From d98e9cd1442b20c65640e7fe52cf223733bf5538 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Fri, 14 Feb 2020 12:51:47 -0800 Subject: [PATCH] trace: update `tracing-subscriber` dependency to 0.2.1 This release makes a number of significant performance improvements when filtering events emitted through the `log` compatibility layer (such as from `hyper` and `h2`). See tokio-rs/tracing#586 for details. Since these performance improvements apply to cases where a filter _disables_ an event, as well as to enabling events, this should improve the proxy's performance with the default log configuration, especially given that `h2` and `hyper` emit a _lot_ of `trace`-level logs in hot paths. Ignoring those logs should now have a much lower overhead. I'm going to do some benchmarking to quantify the performance improvement from this change, so I'll add benchmark results when my tests complete. In addition, 0.2.1 fixes a bug where `EnvFilter`'s filter selection differed from the `env_logger` behavior it was intended to emulate. If the most specific filter directive that applies to a given event did not enable that event's level, filter selection would continue to try decreasingly-specific filters, and would only disable the event if **no** filters enabled it (see tokio-rs/tracing#512). In practice, this means that if you set a filter like ``` LINKERD2_PROXY_LOG=warn,linkerd=debug,linkerd2_metrics=info ``` in an attempt to disable the `debug`-level events in the `linkerd2_metrics` crate, they would still be enabled by the `linkerd=debug` directive. This is now fixed. Signed-off-by: Eliza Weisman --- Cargo.lock | 4 ++-- linkerd/app/core/Cargo.toml | 2 +- linkerd/proxy/transport/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a36a96a9d3..2418c0a609 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2565,9 +2565,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.2.0-alpha.6" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8178ab65c2ae72cd431fcdb51e7317fb0b48d64599e66d52c7b64cd86ee5b482" +checksum = "c6bbfcf5ab0799649189b0df4bd7f730f1929a3846d33ae56cb0ad6e0bbdad09" dependencies = [ "ansi_term", "chrono", diff --git a/linkerd/app/core/Cargo.toml b/linkerd/app/core/Cargo.toml index 44228ecf3e..bb6c0a443d 100644 --- a/linkerd/app/core/Cargo.toml +++ b/linkerd/app/core/Cargo.toml @@ -63,7 +63,7 @@ tracing-futures = "0.1" tracing-log = "0.1" [dependencies.tracing-subscriber] -version = "0.2.0-alpha.6" +version = "0.2.1" # we don't need `chrono` time formatting default-features = false features = ["env-filter", "fmt", "smallvec", "tracing-log", "ansi"] diff --git a/linkerd/proxy/transport/Cargo.toml b/linkerd/proxy/transport/Cargo.toml index 7b9e558436..757813f50a 100644 --- a/linkerd/proxy/transport/Cargo.toml +++ b/linkerd/proxy/transport/Cargo.toml @@ -36,4 +36,4 @@ libc = "0.2" [dev-dependencies] linkerd2-identity = { path = "../../identity", features = ["test-util"] } tower-util = "0.1" -tracing-subscriber = "0.2.0-alpha.6" +tracing-subscriber = "0.2.1"