Skip to content

Commit

Permalink
Merge branch 'master' into greater-than-32
Browse files Browse the repository at this point in the history
  • Loading branch information
eopb authored Aug 15, 2023
2 parents e6dbe96 + 887b9e7 commit ee88af6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ are not maintained by the `tokio` project. These include:
- [`tracing-logfmt`] provides a layer that formats events and spans into the logfmt format.
- [`tracing-chrome`] provides a layer that exports trace data that can be viewed in `chrome://tracing`.
- [`reqwest-tracing`] provides a middleware to trace [`reqwest`] HTTP requests.
- [`tracing-cloudwatch`] provides a layer that sends events to AWS CloudWatch Logs.
- [`clippy-tracing`] provides a tool to add, remove and check for `tracing::instrument`.

(if you're the maintainer of a `tracing` ecosystem crate not in this list,
please let us know!)
Expand Down Expand Up @@ -445,6 +447,8 @@ please let us know!)
[`tracing-chrome`]: https://crates.io/crates/tracing-chrome
[`reqwest-tracing`]: https://crates.io/crates/reqwest-tracing
[`reqwest`]: https://crates.io/crates/reqwest
[`tracing-cloudwatch`]: https://crates.io/crates/tracing-cloudwatch
[`clippy-tracing`]: https://crates.io/crates/clippy-tracing

**Note:** that some of the ecosystem crates are currently unreleased and
undergoing active development. They may be less stable than `tracing` and
Expand All @@ -460,14 +464,17 @@ Tracing.
* [Diagnostics with Tracing][tokio-blog-2019-08] on the Tokio blog, August 2019
* [Production-Grade Logging in Rust Applications][production-logging-2020], November 2020
* [Custom Logging in Rust using `tracing` and `tracing-subscriber`, part 1][custom-logging-part-1] and [part 2][custom-logging-part-2], October 2021
* [Instrumenting Axum projects][detsys-blog-2023-08], August 2023

[tokio-blog-2019-08]: https://tokio.rs/blog/2019-08-tracing/
[detsys-blog-2023-08]: https://determinate.systems/posts/instrumenting-axum

#### Talks

* [Bay Area Rust Meetup talk and Q&A][bay-rust-2019-03], March 2019
* [RustConf 2019 talk][rust-conf-2019-08-video] and [slides][rust-conf-2019-08-slides], August 2019
* [Are we observable yet? @ RustyDays talk][rusty-days-2020-08-video] and [slides][rusty-days-2020-08-slides], August 2020
* [Crabs with instruments!][tremorcon-2021-09], September 2021

[bay-rust-2019-03]: https://www.youtube.com/watch?v=j_kXRg3zlec
[rust-conf-2019-08-video]: https://www.youtube.com/watch?v=JjItsfqFIdo
Expand All @@ -477,6 +484,7 @@ Tracing.
[production-logging-2020]: https://medium.com/better-programming/production-grade-logging-in-rust-applications-2c7fffd108a6
[custom-logging-part-1]: https://burgers.io/custom-logging-in-rust-using-tracing
[custom-logging-part-2]: https://burgers.io/custom-logging-in-rust-using-tracing-part-2
[tremorcon-2021-09]: https://www.youtube.com/watch?v=ZC7fyqshun8

Help us expand this list! If you've written or spoken about Tracing, or
know of resources that aren't listed, please open a pull request adding them.
Expand Down
15 changes: 8 additions & 7 deletions tracing-core/src/field.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//! Span and `Event` key-value data.
//!
//! Spans and events may be annotated with key-value data, referred to as known
//! as _fields_. These fields consist of a mapping from a key (corresponding to
//! a `&str` but represented internally as an array index) to a [`Value`].
//! Spans and events may be annotated with key-value data, known as _fields_.
//! These fields consist of a mapping from a key (corresponding to a `&str` but
//! represented internally as an array index) to a [`Value`].
//!
//! # `Value`s and `Collect`s
//!
Expand Down Expand Up @@ -957,8 +957,9 @@ mod test {
use super::*;
use crate::metadata::{Kind, Level, Metadata};

struct TestCallsite1;
static TEST_CALLSITE_1: TestCallsite1 = TestCallsite1;
// Make sure TEST_CALLSITE_* have non-zero size, so they can't be located at the same address.
struct TestCallsite1(u8);
static TEST_CALLSITE_1: TestCallsite1 = TestCallsite1(0);
static TEST_META_1: Metadata<'static> = metadata! {
name: "field_test1",
target: module_path!(),
Expand All @@ -978,8 +979,8 @@ mod test {
}
}

struct TestCallsite2;
static TEST_CALLSITE_2: TestCallsite2 = TestCallsite2;
struct TestCallsite2(u8);
static TEST_CALLSITE_2: TestCallsite2 = TestCallsite2(0);
static TEST_META_2: Metadata<'static> = metadata! {
name: "field_test2",
target: module_path!(),
Expand Down
2 changes: 1 addition & 1 deletion tracing-journald/src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub fn send_one_fd_to<P: AsRef<Path>>(socket: &UnixDatagram, fd: RawFd, path: P)
msg.msg_control = unsafe { cmsg_buffer.buffer.as_mut_ptr() as _ };
msg.msg_controllen = unsafe { CMSG_SPACE(size_of::<RawFd>() as _) as _ };

let mut cmsg: &mut cmsghdr =
let cmsg: &mut cmsghdr =
unsafe { CMSG_FIRSTHDR(&msg).as_mut() }.expect("Control message buffer exhausted");

cmsg.cmsg_level = SOL_SOCKET;
Expand Down
2 changes: 1 addition & 1 deletion tracing-subscriber/src/fmt/time/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub trait FormatTime {
/// # }
/// ```
pub fn time() -> SystemTime {
SystemTime::default()
SystemTime
}

/// Returns a new `Uptime` timestamp provider.
Expand Down
4 changes: 4 additions & 0 deletions tracing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,8 @@
//! - [`tracing-loki`] provides a layer for shipping logs to [Grafana Loki].
//! - [`tracing-logfmt`] provides a layer that formats events and spans into the logfmt format.
//! - [`reqwest-tracing`] provides a middleware to trace [`reqwest`] HTTP requests.
//! - [`tracing-cloudwatch`] provides a layer that sends events to AWS CloudWatch Logs.
//! - [`clippy-tracing`] provides a tool to add, remove and check for `tracing::instrument`.
//!
//! If you're the maintainer of a `tracing` ecosystem crate not listed above,
//! please let us know! We'd love to add your project to the list!
Expand Down Expand Up @@ -848,6 +850,8 @@
//! [`tracing-logfmt`]: https://crates.io/crates/tracing-logfmt
//! [`reqwest-tracing`]: https://crates.io/crates/reqwest-tracing
//! [`reqwest`]: https://crates.io/crates/reqwest
//! [`tracing-cloudwatch`]: https://crates.io/crates/tracing-cloudwatch
//! [`clippy-tracing`]: https://crates.io/crates/clippy-tracing
//!
//! <div class="example-wrap" style="display:inline-block">
//! <pre class="ignore" style="white-space:normal;font:inherit;">
Expand Down

0 comments on commit ee88af6

Please sign in to comment.