Skip to content
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

backport 13 commits from master #2150

Merged
merged 13 commits into from
Jun 7, 2022
Merged

backport 13 commits from master #2150

merged 13 commits into from
Jun 7, 2022

Commits on Jun 6, 2022

  1. opentelemetry: fix event source locations (#2099)

    Fixes: #2094
    
    ## Motivation 
    
    Properly attach event's source locations.
    
    ## Solution
    
    Append the locations to events' attributes instead of span's
    attributes.
    hubertbudzynski authored and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    6492446 View commit details
    Browse the repository at this point in the history
  2. subscriber: don't enable tracing-core features by default (#2107)

    This attempts to address #2106 by disabling the `tracing-core`
    crate's default features in `tracing-subscriber`'s dependency.
    Now, `tracing-core`'s optional "alloc" feature is only enabled
    when "tracing-subscriber/alloc" is enabled.
    
    Closes #2106
    jamesmunns authored and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    9a3c506 View commit details
    Browse the repository at this point in the history
  3. chore(deps): update tokio-test requirement from 0.2.0 to 0.3.0 (#1379)

    Updates the requirements on [tokio-test](https://github.com/tokio-rs/tokio) to permit the latest version.
    - [Release notes](https://github.com/tokio-rs/tokio/releases)
    - [Commits](tokio-rs/tokio@tokio-0.2.0...tokio-0.3.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Eliza Weisman <eliza@buoyant.io>
    dependabot[bot] and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    fea09a8 View commit details
    Browse the repository at this point in the history
  4. journald: disable default features of tracing-subscriber (#1476)

    ## Motivation
    
    Closes #1465.
    
    ## Solution
    
    I'm just disabling the default features of `tracing-journald`'s
    dependency on `tracing-subscriber`. The original issue talked about the
    crate's dependencies more broadly but considering that the standard
    library is already depended upon I didn't think it made sense to change
    the `tracing-core` dependency's features (which are just `no_std`
    support).
    themaxdavitt authored and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    6878d8d View commit details
    Browse the repository at this point in the history
  5. Add additional information to references of my_crate in env_filter do…

    …cs. (#1088)
    
    Co-authored-by: Bryan Garza <1396101+bryangarza@users.noreply.github.com>
    2 people authored and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    f22f286 View commit details
    Browse the repository at this point in the history
  6. fix opentelemetry example (#2110)

    Co-authored-by: Bryan Garza <1396101+bryangarza@users.noreply.github.com>
    2 people authored and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    cc19449 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1afc9d5 View commit details
    Browse the repository at this point in the history
  8. opentelemetry: enforce event_location for span tags (#2124)

    The `with_event_location(false)` method will now properly omit `code.*`
    tags from spans.
    
    ## Motivation
    
    Recently, I attempted to remove the `code.*` tags from opentelemetry
    tracing spans utilizing the [`with_event_location`] of
    OpenTelemetrySubscriber. This did not work as expected because the
    [`on_new_span`] doesn't account for the `event_location` boolean similar
    to how [`on_event`] does.
    
    ## Solution
    
    The change presented will expand the use of the `location` field to
    check before adding the `code.*` KeyValue attributes in `on_new_span`.
    
    In addition, `with_event_location` was renamed to `with_location`, as it
    now controls both span *and* event locations, and the
    `with_event_location` method has been deprecated.
    
    ## Testing
    
    Additional unit tests are included in
    [tracing-opentelemetry/src/subscriber.rs] to cover both boolean cases of
    `with_location`.
    
    [`with_event_location`]: https://github.com/tokio-rs/tracing/blob/master/tracing-opentelemetry/src/subscriber.rs#L343
    [`on_new_span`]: https://github.com/tokio-rs/tracing/blob/master/tracing-opentelemetry/src/subscriber.rs#L448-L460
    [`on_event`]: https://github.com/tokio-rs/tracing/blob/master/tracing-opentelemetry/src/subscriber.rs#L582
    [tracing-opentelemetry/src/subscriber.rs]: https://github.com/tokio-rs/tracing/pull/2124/files#diff-69011e8b23dffcbe19b9b72e5ac54330a7871f424a90700ed7f5c5686daf431bR911-R975)
    DevinCarr authored and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    92c5425 View commit details
    Browse the repository at this point in the history
  9. appender: add initial set of benches (#2128)

    * appender: add initial set of benches
    
    This patch adds blocking and nonblocking benchmarks. This code is from
    an old PR (#703) that was never merged, and now ported to TOT so that it
    compiles.
    
    Co-authored-by: Zeki Sherif <9832640+zekisherif@users.noreply.github.com>
    
    * switch to no-op writers in benchmarks
    
    * fix macro resolution issue
    
    Co-authored-by: Zeki Sherif <9832640+zekisherif@users.noreply.github.com>
    Co-authored-by: David Barsky <me@davidbarsky.com>
    3 people authored and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    fc370cd View commit details
    Browse the repository at this point in the history
  10. docs: remove incorrect MSRV note (#2137)

    `tracing`'s lib.rs incorrectly states its MSRV; this commit removes it.
    jamen authored and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    aa55bd1 View commit details
    Browse the repository at this point in the history
  11. opentelemetry: add support for thread names/ids (#2134)

    OpenTelemetry has [semantic conventions][1] for reporting thread names
    and IDs on spans. This branch adds support for recording thread names
    and IDs according to these conventions.
    
    [1]: https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/span-general/#source-code-attributes
    
    Signed-off-by: Eliza Weisman <eliza@buoyant.io>
    hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    44892b4 View commit details
    Browse the repository at this point in the history
  12. chore(deps): update parking_lot requirement from >= 0.9.0, <= 0.12 to…

    … >= 0.9.0, <= 0.13 (#2143)
    
    Updates the requirements on [parking_lot](https://github.com/Amanieu/parking_lot) to permit the latest version.
    - [Release notes](https://github.com/Amanieu/parking_lot/releases)
    - [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
    - [Commits](Amanieu/parking_lot@0.12.0...0.12.1)
    
    ---
    updated-dependencies:
    - dependency-name: parking_lot
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    094783d View commit details
    Browse the repository at this point in the history
  13. core, subscriber: migrate from lazy_static to once_cell (#2147)

    Replace `lazy_static` with `once_cell`. Fixes #2146.
    
    ## Motivation
    
    `lazy_static!`, while a declarative macro, is a macro nonetheless. It
    can add quite a bit of additional compilation time cost.
    `once_cell::sync::Lazy` does the same thing with generics, and can be
    used more flexibly (i.e. non-static lazily initialized values), and has
    been proposed to be added to `std` (see linked issue).
    
    I'm trying to reduce the compile time and dependency tree complexity of
    a dependent project: [bevy](https://bevyengine.org), which is using
    tracing. `lazy_static` and `once_cell` are both in our dependency tree
    and both end up doing the same thing.
    
    ## Solution
    
    Migrate to `once_cell`.
    james7132 authored and hawkw committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    bd014f0 View commit details
    Browse the repository at this point in the history