-
Notifications
You must be signed in to change notification settings - Fork 721
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
subscriber: add Targets
filter, a lighter-weight EnvFilter
#1550
Commits on Sep 10, 2021
-
factor out static directives for target filter
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for ad3c782 - Browse repository at this point
Copy the full SHA ad3c782View commit details -
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 6d4215a - Browse repository at this point
Copy the full SHA 6d4215aView commit details
Commits on Sep 11, 2021
-
subscriber: add
Targets
filter, a lighter-weightEnvFilter
This branch adds a new `Targets` filter to `tracing_subscriber`. The `Targets` filter is very similar to `EnvFilter`, but it _only_ consists of filtering directives consisting of a target and level. Because it doesn't support filtering on field names, span contexts, or field values, the implementation is *much* simpler, and it doesn't require the `env_filter` feature flag. Also, `Targets` can easily implement the `Filter` trait for per-layer filtering, while adding a `Filter` implementation for `EnvFilter` will require additional effort. Because the `Targets` filter doesn't allow specifiyng span or field-value filters, the syntax for parsing one from a string is significantly simpler than `EnvFilter`'s. Therefore, it can have a very simple handwritten parser implementation that doesn't require the `regex` crate. This should be useful for users who are concerned about the number of dependencies required by `EnvFilter`. The new implementation is quite small, as it mostly uses the same code as the static filter subset of `EnvFilter`. This code was factored out into a shared module for use in both `EnvFilter` and `Targets`. The code required for _dynamic_ filtering with `EnvFilter` (i.e. on fields and spans) is still in the `filter::env` module and is only enabled by the `env-filter` feature flag. I'm open to renaming the new type; I thought `filter::Targets` seemed good, but would also be willing to go with `TargetFilter` or something.
Configuration menu - View commit details
-
Copy full SHA for 81bd477 - Browse repository at this point
Copy the full SHA 81bd477View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33f030f - Browse repository at this point
Copy the full SHA 33f030fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ec9ae3 - Browse repository at this point
Copy the full SHA 9ec9ae3View commit details -
add example mixing PLF and global filters
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for ffcac85 - Browse repository at this point
Copy the full SHA ffcac85View commit details -
directive::ParseError -> DirectiveParseError
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for fe8dc29 - Browse repository at this point
Copy the full SHA fe8dc29View commit details -
Merge branch 'eliza/target-filter' of github.com:tokio-rs/tracing int…
…o eliza/target-filter
Configuration menu - View commit details
-
Copy full SHA for a1e3167 - Browse repository at this point
Copy the full SHA a1e3167View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0bb8e97 - Browse repository at this point
Copy the full SHA 0bb8e97View commit details -
handle extra trailing garbage in
FromStr
implSigned-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for 26e5833 - Browse repository at this point
Copy the full SHA 26e5833View commit details -
Configuration menu - View commit details
-
Copy full SHA for e82bb0c - Browse repository at this point
Copy the full SHA e82bb0cView commit details -
comment parser/misc review feedback
Signed-off-by: Eliza Weisman <eliza@buoyant.io>
Configuration menu - View commit details
-
Copy full SHA for c904879 - Browse repository at this point
Copy the full SHA c904879View commit details