Commit Graph

96 Commits

Author SHA1 Message Date
tl-rodrigo-gryzinski
bc95f2e5ee tracing: add reqwest-tracing to related crates in README (#2331) 2022-10-03 10:01:11 -07:00
WorldSEnder
3517552c31 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-08-25 17:17:16 +00:00
Kelly Thomas Kline
6ce8cfdd15 docs: correct grammar in README (#2260)
Co-authored-by: Bryan Garza <1396101+bryangarza@users.noreply.github.com>
2022-08-15 23:12:00 +00:00
Maximilian Goisser
3ac632a326 subscriber: update tracing-subscriber version in README (#2273)
`tracing-subscriber` has been on `0.3` for almost a year now.

I naively copied the versions from the README, and when trying to use
the library with the current versions of e.g. `tracing-opentelemetry`, I
ran into the same error message as seen in this issue:
https://github.com/tokio-rs/tracing/issues/852

Co-authored-by: Bryan Garza <1396101+bryangarza@users.noreply.github.com>
2022-08-15 21:53:32 +00:00
Thoren Paulson
0a86943a25 docs: add tracing-chrome to list of related crates (#2275) 2022-08-15 21:25:58 +00:00
Fredrik Enestad
0c863e4207 docs: add tracing-logfmt to related crates (#2163)
Adds tracing-logfmt crate to the related crates section
2022-06-16 11:57:04 -07:00
hrxi
d699b94ae5 docs: Add tracing-loki to "Related Crates" section (#2012) 2022-03-22 19:33:36 +00:00
Quinn
7860a9c661 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 19:14:53 +00:00
Eliza Weisman
4365b3971b 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 17:52:00 +00:00
Arpad Borsos
9d8d366b15 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-01-26 11:13:22 -08:00
Eliza Weisman
feb3479abe 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-11 13:48:39 -08:00
Shaun
ca1e7eba0f docs: fix README.md typo in example #1468 (#1783)
## Motivation

As a new user, I stumbled over a broken link and thought I'd fix it.
Also noticed an unrelated open issue while searching for one about the
broken link, and thought I'd fix that too.

## Solution

Fix the typos.
2021-12-23 13:08:27 -08:00
walfie
500021c46c chore: Fix typos (#1740) 2021-11-22 12:17:10 -05:00
Daniel Müller
7d80af704a docs: Mention test-log instead of test-env-log (#1736)
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:46 -08:00
David Barsky
77bb46f54b chore: add a big stinkin' notice to the README.md about v0.1.x (#1734) 2021-11-20 19:58:29 -08:00
Bryan Burgers
6b6eb6ad37 docs: add blog posts as external resources (#1667)
As requested at https://twitter.com/mycoliza/status/1451288675547967514
2021-10-21 14:19:43 -07:00
Ricky Han
9396211164 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-13 13:46:50 -07:00
Arthur Gautier
a01e100ee5 docs: fixup rust meetup date (#1503)
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-08-10 15:56:54 -07:00
Luca Palmieri
53a0c24dc8 docs: Add tracing-actix-web (#1369) 2021-07-16 13:19:28 -04:00
Yuki Okushi
f40410fdff 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-30 14:41:08 -07:00
Kamil Rojewski
9d7c614397 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>
2020-12-21 11:47:44 -08:00
Hossein Mayboudi
4f93a6e0aa docs: update README.md (#1133)
Update the closing-spans link.
2020-12-14 10:56:11 -08:00
Ecky Putrady
e0fb974a86 docs: add a blogpost link in External Resources section (#1113)
The blogpost is about the usage of tracing and some of its complementary modules.

Related [Reddit comment]( https://www.reddit.com/r/rust/comments/jv6a5j/productiongrade_logging_in_rust_applications/gcrjoa6?utm_source=share&utm_medium=web2x&context=3).
2020-11-21 09:55:06 -08:00
David Barsky
98ba44c22e core: rename Subscriber to Collect (#1015)
This PR renames the following:

- `tracing_core::Subscriber` to `tracing_core::Collect`
- `tracing_subscriber::layer::Layer` to `tracing_subscriber::layer::Subscribe`

Authored-by: David Barsksy <dbarsky@amazon.com>
Co-authored-by: Eliza Weisman <eliza@buoyant.io>
2020-10-22 15:11:23 -04:00
Joshua Nelson
2f59b32a46 chore: fix nightly clippy warnings (#991)
## 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-09-30 09:26:27 -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
Benjamin Saunders
8c0ef97bd4 journald: add tracing-journald crate implementing a simple journald layer (#691)
## Motivation

Support for writing tracing-based logs directly to their standard
destination while preserving both standard and custom metadata on Linux
systems. Improves usability of Linux services and for Linux applications
executing outside of a terminal.

## Solution

It turns out [journald's native protocol][1] is very simple and spoken
over a Unix datagram socket at a fixed location (see [discussion of
stability of these interfaces][2], allowing high quality native support
with ~100LoC.

[journald conventions][3] for structured field names differ from typical
tracing idioms, and journald discards fields which violate its
conventions. Hence, this layer automatically sanitizes field names by
translating `.`s into `_`s, stripping leading `_`s and
non-ascii-alphanumeric characters other than `_`, and upcasing.

Levels are mapped losslessly to journald `PRIORITY` values as follows:

- `ERROR` => Error (3)
- `WARN` => Warning (4)
- `INFO` => Notice (5)
- `DEBUG` => Informational (6)
- `TRACE` => Debug (7)

Note that the naming scheme differs slightly for the latter half.

The standard journald `CODE_LINE` and `CODE_FILE` fields are
automatically emitted. A `TARGET` field is emitted containing the
event's target. Enclosing spans are numbered counting up from the root,
and their fields and metadata are included in fields prefixed by `Sn_`
where `n` is that number.

User-defined fields other than the event `message` field have a prefix
applied by default to prevent collision with standard fields.

[1]: https://www.freedesktop.org/wiki/Software/systemd/export/
[2]: https://systemd-devel.freedesktop.narkive.com/i5tlUyjz/client-logging-to-journald-without-libsystemd-journal-so#post6
[3]: https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
2020-06-29 12:07:24 -07:00
Eliza Weisman
ef8efaa84b docs: better docs on async usage; fancy warning formatting, etc (#769)
This branch makes the following changes:

 - Add a new section to the `Span::enter` docs that explains why 
   it should be avoided in async code, and suggests alternatives.
 - Add links to the new section elsewhere.
 - Add new formatting for "Notes" and "Warnings" in the documentation,
   by (mis?)using existing styles from the RustDoc stylesheet.
 - Fixed a handful of inaccuracies or outdated statements I noticed
   while making other changes.

Fixes  #667

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2020-06-29 12:01:24 -07:00