From 74d2b5660183b9f3e3369ca645cf13e3f8398d13 Mon Sep 17 00:00:00 2001 From: "Neulichedl, Patrick - D0E05450" Date: Fri, 5 May 2023 07:56:46 +0200 Subject: [PATCH 1/2] tracing: improve field docs --- tracing/src/field.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tracing/src/field.rs b/tracing/src/field.rs index 886c53a916..e9aa276d91 100644 --- a/tracing/src/field.rs +++ b/tracing/src/field.rs @@ -1,13 +1,13 @@ //! `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 +//! Spans and events may be annotated with key-value data, referred to 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 `Subscriber`s //! //! `Subscriber`s consume `Value`s as fields attached to [span]s or [`Event`]s. -//! The set of field keys on a given span or is defined on its [`Metadata`]. +//! The set of field keys on a given span or event is defined on its [`Metadata`]. //! When a span is created, it provides [`Attributes`] to the `Subscriber`'s //! [`new_span`] method, containing any fields whose values were provided when //! the span was created; and may call the `Subscriber`'s [`record`] method From 071a9d59940774b45d9b8779d9f5fe2054cdc534 Mon Sep 17 00:00:00 2001 From: "Neulichedl, Patrick - D0E05450" Date: Fri, 5 May 2023 08:04:12 +0200 Subject: [PATCH 2/2] tracing: fix doc warnings --- tracing/src/field.rs | 1 - tracing/src/span.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tracing/src/field.rs b/tracing/src/field.rs index e9aa276d91..ea8e373df5 100644 --- a/tracing/src/field.rs +++ b/tracing/src/field.rs @@ -126,7 +126,6 @@ use crate::Metadata; /// string comparisons. Thus, if possible, once the key for a field is known, it /// should be used whenever possible. /// -/// pub trait AsField: crate::sealed::Sealed { /// Attempts to convert `&self` into a `Field` with the specified `metadata`. /// diff --git a/tracing/src/span.rs b/tracing/src/span.rs index 7be56abdf5..579116ace5 100644 --- a/tracing/src/span.rs +++ b/tracing/src/span.rs @@ -824,7 +824,7 @@ impl Span { /// ///
     ///     Note: The returned 
-    ///     EnteredSpan guard does not implement Send.
+    ///     EnteredSpan guard does not implement Send.
     ///     Dropping the guard will exit this span, and if the guard is sent
     ///     to another thread and dropped there, that thread may never have entered
     ///     this span. Thus, EnteredSpans should not be sent between threads.