-
Notifications
You must be signed in to change notification settings - Fork 791
Backport everything up to May 2025 #3283
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
base: v0.1.x
Are you sure you want to change the base?
Conversation
We had some broken link formatting in the `tracing-journald` docs which clippy picked up (the text looked like a link definition, but wasn't meant to be). The incorrect links have now been corrected. They have to link to the `tracing-core` crate because `tracing-journald` doesn't depend on `tracing` directly. Fixes for a broken link in the `tracing-subscriber` main page and correcting the link to `Collect` from `tracing-log` (which also doesn't depend on `tracing` directly) were also included.
There was a single case of the new [`clippy::double_ended_iterator_last`] lint which was triggered in `tracing-attributes` and needed to be fixed. There were also a number of cases of incorrectly indented lines, caught in [`clippy::doc_overindented_list_items`]. [`clippy::double_ended_iterator_last`]: https://rust-lang.github.io/rust-clippy/master/index.html#double_ended_iterator_last [`clippy::doc_overindented_list_items`]: https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
Fixes: #3140 Co-authored-by: Hayden Stainsby <hds@caffeineconcepts.com>
Co-authored-by: David Barsky <me@davidbarsky.com> Co-authored-by: Hayden Stainsby <hds@caffeineconcepts.com>
If one could get #3033 (or any of the other PRs bumping matchers) in, there seems to be quite some interest in that... (One may also consider bumping mio to version 1, as there is now a stable API. Although that will require increasing MSRV to 1.70, for the above, 1.65 is enough. Let me know if I should provide a PR for that.) |
The outdated release instructions have been removed. Follow up of #2384. Signed-off-by: Rustin170506 <tech@rustin.me>
## Motivation I was checking the example from `/examples/` and saw that some of the module names were incorrect in README, so I fixed them. ## Solution Changed the incorrect name to the correct name.
@jonhoo recorded a great resource about the crate's inner workings and included practical suggestions about patterns to follow when annotating one's code. I added the link to the YouTube video under the "Talks" header as that seemed appropriate enough.
…tor` (#2980) ## Motivation The current behaviour of `DefaultVisitor` is that it will write padding even if it is going to skip writing a value, which results in extraneous padding being added when values are skipped by the `tracing-log` integration. ## Solution With this change, `DefaultVisitor` will only insert padding if it is actually going to write a value. Closes: #2979
… call (#3227) ## Motivation Currently, Span.record_all() is part of the public API and accepts ValueSet as a parameter. However, constructing a ValueSet is both verbose and undocumented, making it not so practical. ## Solution To make recording multiple values easier, we introduce a new macro: record_all!, which wraps the Span.record_all() function. As we don't intend anyone to call Span.record_all() directly, we hide it from the documentation. We reference the new macro from Span.record() doc comment instead. The new record_all! macro supports optional formatting sigils % and ?, ensuring a consistent DevEx with the other value-recording macros. Co-authored-by: Hayden Stainsby <hds@caffeineconcepts.com>
Could you please include #3187 in the release? Thanks in advance. |
I also merged a couple of very simple PRs now (see recent commits on main), most or all of which should be trivial to backport. |
There is a report in #3174 that even in release mode, building the regex used to parse `EnvFilter` directives can take a relatively large amount of time (600us). This change replaces the `regex` based parsing of the directives with a state machine implementation that is faster and also easier to reason about. Fixes: #3174
* macros: Add test involving raw identifier * macros: Remove 'r#' prefix from raw identifiers in field names
This example demonstrates how to use the `tracing-subscriber` crate's `EnvFilter` type to filter log messages based on their metadata. The example provides a text area where users can input an environment filter string, and displays the log messages that would be captured by that filter.
Update the version of the `matchers` crate to 0.2. This requires also adding a direct dependency on `regex-automata` to enable the `std` feature.
It can be useful to have a TestWriter that does not log to stdout but stderr instead. For example, that allows for potentially easier filtering of tracing output (because the remaining output of, say, cargo test goes to stdout) or to mirror behavior of env_logger, which by default logs to stderr. Introduce the TestWriter::with_stderr() constructor to enable such usage. The default is left unchanged. Co-authored-by: David Barsky <me@davidbarsky.com>
Avoid ambiguities with any user-defined `tracing` modules by globally qualifying types used in the attribute-generated code e.g., `::tracing::Level`.
Checkboxes are all ticked, anything else to be done? :) |
Motivation
It's probably time to get a release of the core tracing crates out.
Solution
Backport all the missing changes since the last large backport: #3144
Checklist
The list is in
git log
order and should be completed from bottom to top. Commitsmarked with
(X)
and no checkbox were already backported. Commits markedwith
(S)
have been skipped on purpose.TestWriter
to write to stderr #3187)EnvFilter
directives (subscriber: use state machine to parseEnvFilter
directives #3243)EnvFilter
test coverage (subscriber: increaseEnvFilter
test coverage #3262)portable-atomic
support to othertracing
crates (tracing: addportable-atomic
support to othertracing
crates #3246)portable-atomic
support (core: addportable-atomic
support #3199)record_all!
macro for recording multiple values in one call (tracing: addrecord_all!
macro for recording multiple values in one call #3227)log.*
fields inDefaultVisitor
(subscriber: skip padding when skippinglog.*
fields inDefaultVisitor
#2980)The
portable-atomic
PRs have been skipped because they depend on changes not present in thev0.1.x
branch.