Commit Graph

98 Commits

Author SHA1 Message Date
David Barsky
c6abc10c3a chore: bump MSRV to 1.63 (#2793) 2023-11-07 13:37:19 -08:00
Aaron Roney
223e6c5cc6 docs: add axum-insights to relevant crates. (#2713)
## Motivation

Adding a relevant library to the list of `tracing`-enabled crates.

## Solution

Added to READMEs and documentation.
2023-10-01 10:46:02 -07:00
Jonathan Woollett-Light
5683bb54ff docs: Add clippy-tracing to related crates (#2628)
## Motivation

Sharing tooling.

## Solution

Adds `clippy-tracing` to related crates.

Closes #2627
2023-10-01 10:46:02 -07:00
Ana Hobden
b810aa2bf3 documentation: Add article and talk by hoverbear (#2679) 2023-10-01 10:46:02 -07:00
Yuta Yamaguchi
96cfb82be9 tracing: add tracing-cloudwatch to related cates in README (#2667) 2023-10-01 10:46:02 -07:00
David Barsky
45a2cea8bb subscriber: dim Compact targets, matching the default formatter (#2409)
Fixes https://github.com/tokio-rs/tracing/issues/2408

Just switch to use `dim`

Before:
![2022-12-08_13-58-40](https://user-images.githubusercontent.com/623453/206576169-63ee4e20-b56f-4c63-a9b3-80ba2e97eec9.png)
After:
![2022-12-08_13-55-36](https://user-images.githubusercontent.com/623453/206576055-878d360f-7b95-4e18-bc31-4fb6f1b71a3a.png)
Full mode for comparison:
![2022-12-08_13-55-48](https://user-images.githubusercontent.com/623453/206576054-6e38852c-cb3a-4b84-98e5-50463cdb5073.png)
; Conflicts:
;	tracing-subscriber/src/fmt/format/mod.rs
2023-04-21 16:59:51 -07:00
David Barsky
b4a0cae4d7 chore: move tracing-opentelemetry to its own repo (#2523)
This PR removes tracing-opentelemetry to a dedicated repo located at
https://github.com/tokio-rs/tracing-opentelemetry. (Note that at time of
writing this PR, the new repo has not be made public). We're moving
tracing-opentelemetry to a dedicated repository for the following
reasons:
1. opentelemetry's MSRV is higher than that of `tracing`'s.
2. more importantly, the main `tracing` repo is getting a bit unweildy
   and it feels unreasonable to maintain backports for crates that
   integrate with the larger tracing ecosystem.

(https://github.com/tokio-rs/tracing-opentelemetry does not have the
examples present in this repo; this will occur in a PR that will be
linked from _this_ PR.)
2023-04-21 16:59:51 -07:00
tl-rodrigo-gryzinski
d7372d76b1 tracing: add reqwest-tracing to related crates in README (#2331) 2022-10-06 10:22:35 -07:00
WorldSEnder
e4d3e36605 tracing: add tracing-web to the list of related crates (#2283)
Fixes #2280

## Motivation

I've implemented an alternative to [`tracing-wasm`] to fix some issues
that I had when using it (most are open as longer time bug reports, no
need to recount them here). It should be more up to date with the
current tracing framework and, being layer based, is easier to compose
with other subscribers, e.g. supports formatting and timing on event
logs out of the box.

## Solution

Add the [`tracing-web`] crate to the list of related crates.

[`tracing-wasm`]: (https://github.com/storyai/tracing-wasm)
[`tracing-web`]: https://crates.io/crates/tracing-web/
2022-09-19 11:47:54 -07:00
Kelly Thomas Kline
39798aef9a docs: correct grammar in README (#2260)
Co-authored-by: Bryan Garza <1396101+bryangarza@users.noreply.github.com>
2022-09-19 11:47:54 -07:00
Thoren Paulson
13ac1e4172 docs: add tracing-chrome to list of related crates (#2275) 2022-09-19 11:47:54 -07:00
Fredrik Enestad
edda806fc0 docs: add tracing-logfmt to related crates (#2163)
Adds tracing-logfmt crate to the related crates section
2022-06-22 15:01:24 -07:00
hrxi
092c0fd68f docs: Add tracing-loki to "Related Crates" section (#2012) 2022-03-29 16:20:56 -07:00
Quinn
38a99d8362 docs: add tracing-forest to "Related Crates" section (#1935)
## Motivation

This PR adds [`tracing-forest`](https://crates.io/crates/tracing-forest)
to the list of related crates. `tracing-forest` provides contextual
coherence when writing logs, and is being used by projects like
[Kanidm](https://github.com/kanidm/kanidm/).

## Solution

I added it to the documentation in `lib.rs` and in the README. Am I
missing anything else?
2022-02-17 12:21:18 -08:00
Eliza Weisman
32225276a9 chore: update MSRVs from 1.42 to 1.49 (#1913)
This updates all crates' MSRVs to 1.49 if they were not already greater
than that (`tracing-appender` is at 1.53). Rust 1.49+ is required to
update `parking_lot` to v0.12 (see #1878). Also, `futures-task` (which I
believe is only needed as a transitive dep) now needs 1.45+, so this
also fixes our CI build.

Because `tracing-opentelemetry` previously required 1.46.0, it had a
separate CI MSRV job. Since 1.49.0 is greater than 1.46.0, the separate
check for `tracing-opentelemetry` is no longer needed.

In the process, I removed deprecated uses of
`core::atomic::spin_loop_hint`, which is replaced with
`core::hint::spin_loop` in 1.49.
2022-02-07 15:39:26 -08:00
Arpad Borsos
655938ca1f docs: add sentry-tracing to README/docs (#1864)
## Motivation

We recently released a new version of the Rust SDK which has integration
for `tracing`! 🎉
2022-02-03 16:10:18 -08:00
Eliza Weisman
517a54215f docs: don't state that tracing-futures is required (#1827)
Currently, the documentation states in a few places that the
`tracing-futures` crate is required for asynchronous code to use
`tracing`. This is no longer the case, as `tracing` provides the
`Instrument` combinator for futures; `tracing-futures` is only needed
for things defined in the `futures` crate, such as `Stream` and `Sink`.

This branch updates the documentation so that it doesn't incorrectly
state that `tracing-futures` is required.
2022-01-14 12:12:09 -08:00
Daniel Müller
1890d18448 docs: Mention test-log instead of test-env-log (#1735)
The test-env-log crate has been renamed to test-log to better reflect
its intent of not only catering to env_logger specific initialization
but also tracing (and potentially others in the future).
This change updates the documentation to reference test-log instead of
the now deprecated test-env-log.
2021-11-21 10:35:55 -08:00
Eliza Weisman
4e56741c65 subscriber: prepare to release v0.3.0 (#1677)
# 0.3.0 (Oct 22, 2021)

This is a breaking release of `tracing-subscriber`. The primary breaking
change in this release is the removal of the dependency on the [`chrono`
crate], due to [RUSTSEC-2020-0159]. To replace `chrono`, support is
added for formatting timestamps using the [`time` crate] instead.

In addition, this release includes a number of other breaking API
changes, such as adding (limited) support for `#![no_std]` targets,
removing previously deprecated APIs, and more.

### Breaking Changes

- Removed APIs deprecated in the v0.2.x release series.
- Renamed `Layer::new_span` to `Layer::on_new_span` ([#1674])
- Removed `Layer` impl for `Arc<L: Layer<S>>` and `Arc<dyn Layer<S> +
  ...>` ([#1649])
- Replaced the [`chrono` crate] with the [`time` crate] for timestamp
  formatting, to resolve [RUSTSEC-2020-0159] ([#1646])
- Removed `json` and `env-filter` from default features. They must now
  be enabled explictly ([#1647])
- Changed `FormatEvent::format_event` and `FormatFields::format_fields`
  trait methods to take a `Writer` type, rather than a `&mut dyn
  fmt::Write` trait object ([#1661])
- Changed the signature of the `MakeWriter` trait by adding a lifetime
  parameter ([#781])
  ### Changed

- **layer**: Renamed `Layer::new_span` to `Layer::on_new_span` ([#1674])
- **fmt**: Changed `FormatEvent::format_event` and
  `FormatFields::format_fields` trait methods to take a `Writer` type,
  rather than a `&mut dyn fmt::Write` trait object ([#1661])
- **json**, **env-filter**: `json` and `env-filter` feature flags are no
  longer enabled by default ([#1647])
  ### Removed

- Removed deprecated `CurrentSpan` type ([#1320])
- **registry**: Removed deprecated `SpanRef::parents` iterator, replaced
  by `SpanRef::scope` in [#1431] ([#1648)])
- **layer**: Removed deprecated `Context::scope` iterator, replaced by
  `Context::span_scope` and `Context::event_scope` in [#1431] and
  [#1434] ([#1648)])
- **layer**: Removed `Layer` impl for `Arc<L: Layer<S>>` and `Arc<dyn
  Layer<S> + ...>`. These interfere with per-layer filtering. ([#1649])
- **fmt**: Removed deprecated `LayerBuilder` type ([#1673])
- **fmt**: Removed `fmt::Layer::on_event` (renamed to
  `fmt::Layer::fmt_event`) ([#1673])
- **fmt**, **chrono**: Removed the `chrono` feature flag and APIs for
  using the [`chrono` crate] for timestamp formatting ([#1646])
  ### Added

- **fmt**, **time**: `LocalTime` and `UtcTime` types for formatting
  timestamps using the [`time` crate] ([#1646])
- **fmt**: Added a lifetime parameter to the `MakeWriter` trait,
  allowing it to return a borrowed writer. This enables implementations
  of `MakeWriter` for types such as `Mutex<T: io::Write>` and
  `std::fs::File`. ([#781])
- **env-filter**: Documentation improvements ([#1637])
- Support for some APIs on `#![no_std]` targets, by disabling the `std`
  feature flag ([#1660])

Thanks to @Folyd and @nmathewson for contributing to this release!

[#1320]: https://github.com/tokio-rs/tracing/pull/1320
[#1673]: https://github.com/tokio-rs/tracing/pull/1673
[#1674]: https://github.com/tokio-rs/tracing/pull/1674
[#1646]: https://github.com/tokio-rs/tracing/pull/1646
[#1647]: https://github.com/tokio-rs/tracing/pull/1647
[#1648]: https://github.com/tokio-rs/tracing/pull/1648
[#1649]: https://github.com/tokio-rs/tracing/pull/1649
[#1660]: https://github.com/tokio-rs/tracing/pull/1660
[#1661]: https://github.com/tokio-rs/tracing/pull/1661
[#1431]: https://github.com/tokio-rs/tracing/pull/1431
[#1434]: https://github.com/tokio-rs/tracing/pull/1434
[#781]: https://github.com/tokio-rs/tracing/pull/781

[`chrono` crate]: https://crates.io/crates/chrono
[`time` crate]: https://crates.io/crates/time
[RUSTSEC-2020-0159]: https://rustsec.org/advisories/RUSTSEC-2020-0159.html

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2021-10-22 16:01:35 -07:00
Bryan Burgers
ffdce75bef docs: add blog posts as external resources (#1667)
As requested at https://twitter.com/mycoliza/status/1451288675547967514
2021-10-22 13:26:09 -07:00
Ricky Han
00aebfac9e docs: add tracing-etw to Related Crates (#1635)
This PR adds tracing-etw which is a new crate.

* Update README.md

* Update lib.rs
2021-10-22 13:26:09 -07:00
Arthur Gautier
28754222f5 docs: fixup rust meetup date (#1503)
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-08-16 17:38:30 -07:00
Luca Palmieri
aa589d9aec docs: Add tracing-actix-web (#1369) 2021-08-16 17:38:30 -07:00
Yuki Okushi
51965bfcdb docs: fix a broken link (and minor typo) on README (#1337)
## Motivation

Fix a broken link for `#[instrument]`. Also, fix a minor typo (`initalized` ->
 `initialized`).
2021-03-31 15:17:39 -07:00
Kamil Rojewski
46137e7820 docs: add tracing-elastic-apm to related crates (#1146)
## Motivation

From the readme

> (if you're the maintainer of a tracing ecosystem crate not in this list, please let us know!)

## Solution

Added links to tracing-elastic-apm.

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
2021-01-28 10:28:56 -08:00
Hossein Mayboudi
09a5509f67 docs: update README.md (#1133)
Update the closing-spans link.
2020-12-14 11:20:38 -08:00
Eliza Weisman
4b54cbc689 chore: fix nightly clippy warnings (#991) (#1025)
This backports PR #991 to v0.1.x. This is primarily necessary for the MSRV
bump, since some dependencies no longer compile on Rust 1.40.0.

This has already been approved on `master`, in PR #991, so it should be 
fine to ship.

## Motivation

This will avoid breaking CI on new releases of clippy. It also makes the
code a little easier to read.

## Solution

- Convert `match val { pat => true, _ => false }` to `matches!(val, pat)`
- Remove unnecessary closures
- Convert `self: &mut Self` to `&mut self`

This bumps the MSRV to 1.42.0 for `matches!`.
The latest version of rust is 1.46.0, so as per
https://github.com/tokio-rs/tracing#supported-rust-versions this is not
considered a breaking change.

I didn't fix the following warning because the fix was not trivial/needed
a decision:

```
warning: you are deriving `Ord` but have implemented `PartialOrd` explicitly
   --> tracing-subscriber/src/filter/env/field.rs:16:32
    |
16  | #[derive(Debug, Eq, PartialEq, Ord)]
    |                                ^^^
    |
    = note: `#[warn(clippy::derive_ord_xor_partial_ord)]` on by default
note: `PartialOrd` implemented here
   --> tracing-subscriber/src/filter/env/field.rs:98:1
    |
98  | / impl PartialOrd for Match {
99  | |     fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
100 | |         // Ordering for `Match` directives is based first on _whether_ a value
101 | |         // is matched or not. This is semantically meaningful --- we would
...   |
121 | |     }
122 | | }
    | |_^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derive_ord_xor_partial_ord
```

As a side note, this found a bug in clippy 😆 https://github.com/rust-lang/rust-clippy/issues/6089
2020-10-07 14:10:49 -07:00
David Barsky
a8cc977e01 tracing: Instrument std::future::Future (#808)
Authored-by: David Barsky <dbarsky@amazon.com>
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
2020-09-25 16:15:06 -04:00
Simonas Kazlauskas
fbaa2fdffd docs: add tracing-tracy to related crates (#964)
## Motivation

tracing-tracy has become tested enough that I’m comfortable with suggesting it to
people at least to try out.

## Solution

List the crate among other related crates.
2020-09-04 13:14:29 -07:00
John Children
5e48505d76 docs: Add diesel-tracing to related crates (#947)
Includes a listing of `diesel-tracing` as a related third party crate.

This crate provides instrumented versions of the Diesel Connection
structs that will also collect and report information about the
underlying connection.

## Motivation

`diesel-tracing` is a third party integration that provides
instrumentation for diesel connections which may be useful to some
`tracing` users.

https://github.com/CQCL/diesel-tracing/issues/7

## Solution

Adds `diesel-tracing` to the documentation so that users might discover
it.
2020-08-21 10:09:32 -07:00
Andre B. Reis
ede3f1a81e docs: add tracing-unwrap to the Related Crates (#944)
This PR adds [`tracing-unwrap`](https://docs.rs/tracing-unwrap) to the
list of related crates in the readme.

`tracing-unwrap` provides convenience methods to unwrap `Result` and
`Option` types and automatically report failures via `tracing` before
panicking.

Feel free to edit the description I wrote as you see fit. Thanks!
2020-08-19 18:02:48 -07:00
Daniel Müller
6964b489b3 docs: Mention test-env-log as "related crate" (#939)
The test-env-log crate comes in useful when testing tracing based
applications/libraries. With this change we mention it in the Related
Crates section of the README in the root directory and the tracing crate
itself.
2020-08-18 19:49:37 -07:00
Eliza Weisman
3f8280ae69 docs: consistent MSRV docs & policy explanation (#941)
## Motivation

PR #934 fixed a bug in the CI configuration where MSRV checks were not
being run correctly. After this was fixed, it was necessary to bump the
MSRV to 1.40.0, as the tests were no longer actually passing on 1.39,
because some dependencies no longer support it.

While updating the documentation to indicate that the new MSRV is 1.40,
I noticed that the note on the MSRV was located inconsistently in the
READMEs and `lib.rs` documentation of various crates, and missing
entirely in some cases. Additionally, there have been some questions on
what our MSRV _policies_ are, and whether MSRV bumps are considered
breaking changes (see e.g. #936). 

## Solution

I've updated all the MSRV notes in the documentation and READMEs to
indicate that the MSRV is 1.40. I've also ensured that the MSRV note is
in the same place for every crate (at the end of the "Overview" section
in the docs), and that it's formatted consistently.

Furthermore, I added a new section to the READMEs and `lib.rs` docs
explaining the current MSRV policy in some detail. Hopefully, this
should answer questions like #936 in the future. The MSRV note in the
overview section includes a link to the section with further details.

Finally, while doing this, I noticed a couple of crates
(`tracing-journald` and `tracing-serde`) were missing top-level `lib.rs`
docs. Rather than just adding an MSRV note and nothing else, I went
ahead and fixed this using documentation from those crate's READMEs.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2020-08-18 12:11:16 -07:00
messense
806f81a694 docs: fix install global subscriber example in README.md (#931) 2020-08-14 10:30:17 -07:00
Eliza Weisman
bb8e977ab7 docs: fix broken splash graphic link (#913)
Somehow a single line of whitespace is load-bearing I guess? MARKDOWN!

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2020-08-10 15:24:31 -07:00
Eliza Weisman
6361e8989d core: prepare to release 0.1.14 (#912)
### Fixed

- Incorrect calculation of global max level filter which could result in
  fast filtering paths not being taken (#908)
2020-08-10 15:12:48 -07:00
Eliza Weisman
59da1ccc60 docs: put splash graphic in all READMEs (#911)
This puts the splash SVG in every crate's README, so
that it will be rendered on crates.io.

I also changed the link to an absolute URL, to ensure that
it works even outside of the repo.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2020-08-10 14:04:02 -07:00
Teodor Voinea
75e964e2f2 docs: Add missing semicolon to README.md (#903) 2020-08-08 11:34:59 -04:00
Eliza Weisman
63c0f317f9 docs: add splash image to the main README (#895)
This branch adds an SVG splash graphic to the main
repository readme, based on the illustration on tokio.rs.

I thought about sticking a big "As seen in rustc!" on there,
and we *could* still do this...

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2020-08-07 09:39:52 -07:00
Adam Chalmers
cafb1c229a docs: Fix typo in README.md (#893)
## Motivation

Tiny typo fix!

## Solution

s/than/that
2020-08-06 14:29:09 -07:00
Martin Packman
0da8e3f376 Improve README for first time users (#825)
## Motivation

The documentation nearly put me off trying to use `tracing` at all. It
looks hard to set up and use, and the two problems I first ran into
(needing to output to stderr, and instrumenting a function with a
non-formattable arg) were not easy to find the right solutions for.

## Solution

This change rearranges the README a little to emphasise solutions,
rather than problems and extra details a first time user probably
doesn't need to care about yet.

* Start with the simple way of setting up a subscriber rather than
  diving into the complex ways. 
* Show the preferred method of instrumenting async code before
  explaining why it is more complex and how it's implemented.
* Remove yak credit. Does anyone care?
* Further tweaks to README contents

Address @hawkw review comments. Opted for clearer wording in passages
joining examples together rather than extra reordering for now.

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
2020-08-05 10:33:35 -07:00
Luca Palmieri
c0964d9800 docs: add Rusty Days talk (#876)
I spent quite a large portion of my talk at Rusty days discussing
logging/structured logging/distributed tracing, covering our usage of `tracing`.
If you think it's relevant I'd be happy to add it to the list 😁 

P.S. there were some trailing whitespaces that my VIM setup ruthlessly
eliminated. Let me know if you want me to leave them there.

* Add talk
* Use uniform format
2020-08-05 09:15:53 -07:00
Eliza Weisman
0b538ce89b core: prepare to release 0.1.13 (#888)
Fixed

- Missing `fmt::Display` impl for `field::DisplayValue` causing a
  compilation failure when the "log" feature is enabled (#887)

Thanks to @d-e-s-o for contributing to this release!
2020-08-04 20:08:00 -07:00
Eliza Weisman
ed803e1369 core: prepare to release 0.1.12 (#871)
### Added

- `LevelFilter` type and `LevelFilter::current()` for returning the
  highest level that any subscriber will enable (#853)
- `Subscriber::max_level_hint` optional trait method, for setting the
  value returned by `LevelFilter::current()` (#853)

### Fixed

- **docs**: Removed outdated reference to a Tokio API that no longer exists
  (#857)

Thanks to new contributor @dignati for contributing to this release!

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2020-07-31 11:19:32 -07:00
Robert Collins
32cf418c3b tracing: add support literals for field names (#790)
## Motivation

Some opentracing systems use fields with : in the names, which are not
legal rust identifiers. We could special case :, but then we have
complicated double-nested patterns (repeated idents separated by : and a
nested repeat separated by .), and this may by a case of always being
one-step-behind as more cases turn up; so this patch instead just gets
in front and lets users put in whatever they want: as they are not rust
identifiers, they miss out on some niceness. 

## Solution

This permits : in field names but also potentially anything
stringifiable, which may be overly liberal.

Signed-off-by: Robert Collins <robert.collins@cognite.com>
2020-07-29 17:36:44 -07:00
Cole Lawrence
aa5c5239ef docs: Add tracing-wasm to "Related Crates" (#841)
## Motivation

I'd like to get more feedback on our [`tracing-wasm` crate][1], as well as 
improve its discoverability.

[1]: https://crates.io/crates/tracing-wasm

## Solution

Add a link to the crate to the "Related Crates" section of the readme file.
2020-07-28 15:23:24 -07:00
Benjamin Herr
cdeefe3bc1 tracing: fix doc links in README (#849)
## Motivation

some of the links in the readme don't work or go to the wrong targets

## Solution

  * the `closing` link needs another `tracing/` in the path
  * the `#[instrument]` link apparently can't have `#[ ]`
  * `tracing-core` shouldn't be another link to `tracing`
  * avoid duplicate link targets for contained crates
2020-07-27 10:11:12 -07:00
Ethan Brierley
1bc1d396ef docs: Add tide-tracing to "Related Crates" (#850)
## Motivation

From the readme

> (if you're the maintainer of a tracing ecosystem crate not in this list, please let us know!)

## Solution

Added link to tide-tracing on readme and doc comment.
2020-07-26 16:20:57 -07:00
Jane Lusby
651f0e17d9 docs: add spandoc to related crates (#813) 2020-07-13 08:46:00 -07:00
Eliza Weisman
1d03546338 docs: fix broken link in README (#780)
This link had the wrong reference and didn't render.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2020-07-06 17:53:22 -07:00