Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tokio-rs/tracing
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: tracing-subscriber-0.3.10
Choose a base ref
...
head repository: tokio-rs/tracing
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: tracing-subscriber-0.3.11
Choose a head ref
  • 10 commits
  • 21 files changed
  • 4 contributors

Commits on Apr 1, 2022

  1. core: prepare to release 0.1.24 (#2042)

    # 0.1.24 (April 1, 2022)
    
    This release fixes a bug where setting `NoSubscriber` as the local
    default would not locally disable the current global default subscriber.
    
    ### Fixed
    
    - Setting `NoSubscriber` as the local default now correctly disables the
      global default subscriber ([#2001])
    - Fixed compilation warnings with the "std" feature disabled ([#2022])
    
    ### Changed
    
    - Removed unnecessary use of `write!` and `format_args!` macros
      ([#1988])
    
    [#1988]: #1988
    [#2001]: #2001
    [#2022]: #2022
    hawkw authored Apr 1, 2022
    Configuration menu
    Copy the full SHA
    8f240e6 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2022

  1. tracing: fix issues compiling for WASM/other <=32-bit platforms (#2060)

    This changes the "unregistered" interest state from `0xDEADFACED`
    to`0xDEAD`, which should fit in a `usize` even on 16-bit platforms. The
    actual value of this thing doesn't matter at all, it just has to be "not
    0, 1, or 2", and it's good for it to be something weird to make it more
    obvious in the event of stuff going wrong.
    
    This should fix a warning being emitted when building for wasm (and
    other <=32-bit platforms) because the previous literal would be
    truncated.
    
    Also, the `wasm_bindgen_test` macro apparently messes with the 
    `macros_redefined_core` tests, so skip them on wasm.
    hawkw authored Apr 8, 2022
    Configuration menu
    Copy the full SHA
    38da7ea View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2022

  1. chore: fix Rust 1.60 warnings (#2056)

    ## Motivation
    
    The Rust 1.60 release introduced a few new lints that trigger on the
    `tracing` codebase. In particular, `clippy` added some new lints for
    method naming, and the `unreachable_pub` lint now seems to be triggered
    incorrectly by `pub use foo as _` re-exports.
    
    ## Solution
    
    This branch fixes the lints.
    
    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Apr 9, 2022
    Configuration menu
    Copy the full SHA
    66514cd View commit details
    Browse the repository at this point in the history
  2. subscriber: fix empty string handling in EnvFilter::builder().parse (

    …#2052)
    
    ## Motivation
    
    See issue #2046. When using calling [`Builder::parse`] or
    [`Builder::parse_lossy`] with  an empty string an error is produced.
    This happens for example when `EnvFilter::from_default_env()` is called,
    but the `RUST_LOG` variable is unset. This regression was introduced by
    #2035.
    
    ## Solution
    
    Filter any empty directives. This allows the whole string to be empty,
    as well as leading and trailing commas. A unit test was added for
    [`Builder::parse`], but not [`Builder::parse_lossy`] because it (per
    definition) doesn't produce any side effects visible from tests when
    erroring.
    
    Fixes #2046
    
    [`Builder::parse`]: https://github.com/tokio-rs/tracing/blob/cade7e311848227348c9b3062e4a33db827a0390/tracing-subscriber/src/filter/env/builder.rs#L151=
    [`Builder::parse_lossy`]: https://github.com/tokio-rs/tracing/blob/cade7e311848227348c9b3062e4a33db827a0390/tracing-subscriber/src/filter/env/builder.rs#L135=
    Ma124 authored and hawkw committed Apr 9, 2022
    Configuration menu
    Copy the full SHA
    75f82ec View commit details
    Browse the repository at this point in the history
  3. subscriber: add inherent impls for EnvFilter methods (#2057)

    ## Motivation
    
    Currently, there is a potential namespace resolution issue when calling
    `EnvFilter` methods that have the same name in the `Filter` and
    `Layer` traits (such as `enabled` and `max_level_hint`). When both
    `Filter` and `Layer` are in scope, the method resolution is
    ambiguous.
    
    See #1983 (comment)
    
    ## Solution
    
    This commit solves the problem by making the inherent method versions of
    these methods public. When the traits are in scope, name resolution will
    always select the inherent method prefer`entially, preventing the name
    clash.
    
    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Apr 9, 2022
    Configuration menu
    Copy the full SHA
    d554b2b View commit details
    Browse the repository at this point in the history
  4. subscriber: add missing Filter::on_record for to EnvFilter (#2058)

    Depends on #2057
    
    ## Motivation
    
    Currently, `EnvFilter`'s `Layer` implementation provides a
    `Layer::on_record` method, but its `Filter` implementation is
    missing the corresponding `Filter::on_record` implementation. This means
    that when using `EnvFilter` as a per-layer filter, recording span
    fields after the spans were created will not update the filter state.
    
    ## Solution
    
    This commit factors out the `on_record` implementation for `Layer`
    into an inherent method, and adds a new `Filter::on_record` method that
    calls it as well.
    
    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Apr 9, 2022
    Configuration menu
    Copy the full SHA
    b0146c5 View commit details
    Browse the repository at this point in the history
  5. journald: remove span field prefixes; add separate fields for span da…

    …ta (#1968)
    
    ## Motivation
    
    Currently, `tracing-journald` prefixes event fields with the number
    of parent spans, if present, in order to namespace field values. This
    turned out to be unnecessary as journald preserves values for duplicated
    field names.
    
    ## Solution
    
    This branch removes event field prefixes and emits parent span names
    and their field/value pairs as additional key/value pairs.
    wiktorsikora authored and hawkw committed Apr 9, 2022
    Configuration menu
    Copy the full SHA
    ce613f8 View commit details
    Browse the repository at this point in the history
  6. chore(ci): add a minimal-versions check (#2015)

    This adds a minimal-versions check to the tracing project. Adapted from
    `tokio-rs/tokio`. Adding this avoids breaking downstream dependencies
    from accidentally under-constraining minimal versions of dependencies
    when they depend on tracing.
    
    I've currently just introduced the check. I will try to and do encourage
    others to add patches to fix this where possible since it can be a fair
    bit of work to chase down a version of all dependencies that passes
    minimal-versions and is msrv. I've also seen some really odd
    windows-specific issues (which are not being tested for here).
    
    This is currently only testing `tracing`, `tracing-core`, and
    `tracing-subscriber`. Packages such as `tracing-futures` are proving to
    be a bit harder to deal with due to having features which enable very
    old dependencies.
    
    Steps to test the build minimal versions locally:
    
    ```sh
    cargo install cargo-hack
    rustup default nightly
    cargo hack --remove-dev-deps --workspace
    cargo update -Z minimal-versions
    cargo hack check --all-features --ignore-private
    ```
    
    CC: tokio-rs/tokio#4513
    udoprog authored and hawkw committed Apr 9, 2022
    Configuration menu
    Copy the full SHA
    d91af65 View commit details
    Browse the repository at this point in the history
  7. tracing: prepare to release v0.1.33 (#2061)

    # 0.1.33 (April 9, 2022)
    
    This release adds new `span_enabled!` and `event_enabled!` variants of
    the `enabled!` macro, for testing whether a subscriber would
    specifically enable a span or an event.
    
    ### Added
    
    - `span_enabled!` and `event_enabled!` macros ([#1900])
    - Several documentation improvements ([#2010], [#2012])
    
    ### Fixed
    
    - Compilation warning when compiling for <=32-bit targets (including
      `wasm32`) ([#2060])
    
    Thanks to @guswynn, @arifd, @hrxi, @CAD97, and @name1e5s for
    contributing to this release!
    
    [#1900]: #1900
    [#2010]: #2010
    [#2012]: #2012
    [#2060]: #2060
    hawkw authored Apr 9, 2022
    Configuration menu
    Copy the full SHA
    40fb304 View commit details
    Browse the repository at this point in the history
  8. subscriber: prepare to release v0.3.11 (#2062)

    # 0.3.11 (Apr 9, 2022)
    
    This is a bugfix release for the `Filter` implementation for `EnvFilter` added
    in [v0.3.10].
    
    ### Fixed
    
    - **env-filter**: Added missing `Filter::on_record` callback to `EnvFilter`'s
      `Filter` impl ([#2058])
    - **env-filter**: Fixed method resolution issues when calling `EnvFilter`
      methods with both the `Filter` and `Layer` traits in scope ([#2057])
    - **env-filter**: Fixed `EnvFilter::builder().parse()` and other parsing methods
      returning an error when parsing an empty string ([#2052])
    
    Thanks to new contributor @Ma124 for contributing to this release!
    
    [v0.3.10]: https://github.com/tokio-rs/tracing/releases/tag/tracing-subscriber-0.3.10
    [#2058]: #2058
    [#2057]: #2057
    [#2052]: #2052
    hawkw authored Apr 9, 2022
    Configuration menu
    Copy the full SHA
    b9da544 View commit details
    Browse the repository at this point in the history
Loading