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>
8 tasks
Co-authored-by: David Barsky <me@davidbarsky.com> Co-authored-by: Hayden Stainsby <hds@caffeineconcepts.com>
Contributor
|
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>
Contributor
Author
## 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>
Contributor
|
Could you please include #3187 in the release? Thanks in advance. |
Member
|
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`.
Member
|
Checkboxes are all ticked, anything else to be done? :) |
Contributor
Author
|
There are a few other PRs which are just about ready to go in, so it would be good to get them in and backported as well. |
Member
There are a few warnings when building the docs causing failures on CI. This change fixes those and adds `unsound_local_offset` as an unexpeced cfg.
`self` and `other` are references, and the `ptr::eq()` call intends to determine if they designate the same object. Putting them behind another level of reference will always return `false`, as those short-lived references will be compared instead.
## Motivation While configuring tracing-appender, I wanted to specify a weekly log rotation interval. I was unable to do so, as the largest rotation interval was daily. ## Solution Before my introduction of weekly log rotation, rounding the current `OffsetDateTime` was straightforward: we could simply keep the current date and truncate part or all of the time component. However, we cannot simply truncate the time with weekly rotation; the date must now be modified. To round the date, we roll logs at 00:00 UTC on Sunday. This gives us consistent date-times that only change weekly.
jplatte
approved these changes
Jun 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 logorder 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.dead_codelint work on#[instrument]ed functions (Letdead_codelint work on#[instrument]ed functions #3108)TestWriterto write to stderr #3187)EnvFilterdirectives (subscriber: use state machine to parseEnvFilterdirectives #3243)EnvFiltertest coverage (subscriber: increaseEnvFiltertest coverage #3262)portable-atomicsupport to othertracingcrates (tracing: addportable-atomicsupport to othertracingcrates #3246)portable-atomicsupport (core: addportable-atomicsupport #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-atomicPRs have been skipped because they depend on changes not present in thev0.1.xbranch.