-
Notifications
You must be signed in to change notification settings - Fork 744
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
core: expose an accessor for the FieldSet
on Attributes
#1331
Conversation
Hmm. I wonder if it's better to just expose an accessor for the |
A good alternative. 👍 I'll do some changes to this PR. |
len()
method to Attributes
FieldSet
on Attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of small nits. Once those are addressed, I'll be happy to merge this, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
## Motivation Exposing an accessor for the `FieldSet` on `Attributes` can motivate the subscriber to achieve some performance improvement, such as `OpenTelemetrySubscriber` #1327. ## Alternative Make `ValueSet::field_set()` be `pub` instead of `pub(crate)`. Co-authored-by: Eliza Weisman <eliza@buoyant.io>
## Motivation Exposing an accessor for the `FieldSet` on `Attributes` can motivate the subscriber to achieve some performance improvement, such as `OpenTelemetrySubscriber` #1327. ## Alternative Make `ValueSet::field_set()` be `pub` instead of `pub(crate)`. Co-authored-by: Eliza Weisman <eliza@buoyant.io>
## Motivation Exposing an accessor for the `FieldSet` on `Attributes` can motivate the subscriber to achieve some performance improvement, such as `OpenTelemetrySubscriber` #1327. ## Alternative Make `ValueSet::field_set()` be `pub` instead of `pub(crate)`. Co-authored-by: Eliza Weisman <eliza@buoyant.io>
## Motivation Exposing an accessor for the `FieldSet` on `Attributes` can motivate the subscriber to achieve some performance improvement, such as `OpenTelemetrySubscriber` #1327. ## Alternative Make `ValueSet::field_set()` be `pub` instead of `pub(crate)`. Co-authored-by: Eliza Weisman <eliza@buoyant.io>
## Motivation Exposing an accessor for the `FieldSet` on `Attributes` can motivate the subscriber to achieve some performance improvement, such as `OpenTelemetrySubscriber` #1327. ## Alternative Make `ValueSet::field_set()` be `pub` instead of `pub(crate)`. Co-authored-by: Eliza Weisman <eliza@buoyant.io>
# 0.1.18 (April 30, 2010) ### Added - `Subscriber` impl for `Box<dyn Subscriber + Send + Sync + 'static>` ([#1358]) - `Subscriber` impl for `Arc<dyn Subscriber + Send + Sync + 'static>` ([#1374]) - Symmetric `From` impls for existing `Into` impls on `Current` and `Option<Id>` ([#1335]) - `Attributes::fields` accessor that returns the set of fields defined on a span's `Attributes` ([#1331]) Thanks to @Folyd for contributing to this release! [#1358]: #1358 [#1374]: #1374 [#1335]: #1335 [#1331]: #1331
# 0.1.18 (April 30, 2010) ### Added - `Subscriber` impl for `Box<dyn Subscriber + Send + Sync + 'static>` ([#1358]) - `Subscriber` impl for `Arc<dyn Subscriber + Send + Sync + 'static>` ([#1374]) - Symmetric `From` impls for existing `Into` impls on `Current` and `Option<Id>` ([#1335]) - `Attributes::fields` accessor that returns the set of fields defined on a span's `Attributes` ([#1331]) Thanks to @Folyd for contributing to this release! [#1358]: #1358 [#1374]: #1374 [#1335]: #1335 [#1331]: #1331
# 0.1.26 (April 30, 2021) ### Fixed - **attributes**: Compatibility between `#[instrument]` and `async-trait` v0.1.43 and newer ([#1228]) - Several documentation fixes ([#1305], [#1344]) ### Added - `Subscriber` impl for `Box<dyn Subscriber + Send + Sync + 'static>` ([#1358]) - `Subscriber` impl for `Arc<dyn Subscriber + Send + Sync + 'static>` ([#1374]) - Symmetric `From` impls for existing `Into` impls on `span::Current`, `Span`, and `Option<Id>` ([#1335], [#1338]) - `From<EnteredSpan>` implementation for `Option<Id>`, allowing `EnteredSpan` to be used in a `span!` macro's `parent:` field ([#1325]) - `Attributes::fields` accessor that returns the set of fields defined on a span's `Attributes` ([#1331]) Thanks to @Folyd, @nightmared, and new contributors @rmsc and @Fishrock123 for contributing to this release! [#1227]: #1228 [#1305]: #1305 [#1325]: #1325 [#1338]: #1338 [#1344]: #1344 [#1358]: #1358 [#1374]: #1374 [#1335]: #1335 [#1331]: #1331
# 0.1.26 (April 30, 2021) ### Fixed - **attributes**: Compatibility between `#[instrument]` and `async-trait` v0.1.43 and newer ([#1228]) - Several documentation fixes ([#1305], [#1344]) ### Added - `Subscriber` impl for `Box<dyn Subscriber + Send + Sync + 'static>` ([#1358]) - `Subscriber` impl for `Arc<dyn Subscriber + Send + Sync + 'static>` ([#1374]) - Symmetric `From` impls for existing `Into` impls on `span::Current`, `Span`, and `Option<Id>` ([#1335], [#1338]) - `From<EnteredSpan>` implementation for `Option<Id>`, allowing `EnteredSpan` to be used in a `span!` macro's `parent:` field ([#1325]) - `Attributes::fields` accessor that returns the set of fields defined on a span's `Attributes` ([#1331]) Thanks to @Folyd, @nightmared, and new contributors @rmsc and @Fishrock123 for contributing to this release! [#1227]: #1228 [#1305]: #1305 [#1325]: #1325 [#1338]: #1338 [#1344]: #1344 [#1358]: #1358 [#1374]: #1374 [#1335]: #1335 [#1331]: #1331
# 0.1.18 (April 30, 2010) ### Added - `Subscriber` impl for `Box<dyn Subscriber + Send + Sync + 'static>` ([tokio-rs#1358]) - `Subscriber` impl for `Arc<dyn Subscriber + Send + Sync + 'static>` ([tokio-rs#1374]) - Symmetric `From` impls for existing `Into` impls on `Current` and `Option<Id>` ([tokio-rs#1335]) - `Attributes::fields` accessor that returns the set of fields defined on a span's `Attributes` ([tokio-rs#1331]) Thanks to @Folyd for contributing to this release! [tokio-rs#1358]: tokio-rs#1358 [tokio-rs#1374]: tokio-rs#1374 [tokio-rs#1335]: tokio-rs#1335 [tokio-rs#1331]: tokio-rs#1331
# 0.1.26 (April 30, 2021) ### Fixed - **attributes**: Compatibility between `#[instrument]` and `async-trait` v0.1.43 and newer ([tokio-rs#1228]) - Several documentation fixes ([tokio-rs#1305], [tokio-rs#1344]) ### Added - `Subscriber` impl for `Box<dyn Subscriber + Send + Sync + 'static>` ([tokio-rs#1358]) - `Subscriber` impl for `Arc<dyn Subscriber + Send + Sync + 'static>` ([tokio-rs#1374]) - Symmetric `From` impls for existing `Into` impls on `span::Current`, `Span`, and `Option<Id>` ([tokio-rs#1335], [tokio-rs#1338]) - `From<EnteredSpan>` implementation for `Option<Id>`, allowing `EnteredSpan` to be used in a `span!` macro's `parent:` field ([tokio-rs#1325]) - `Attributes::fields` accessor that returns the set of fields defined on a span's `Attributes` ([tokio-rs#1331]) Thanks to @Folyd, @nightmared, and new contributors @rmsc and @Fishrock123 for contributing to this release! [tokio-rs#1227]: tokio-rs#1228 [tokio-rs#1305]: tokio-rs#1305 [tokio-rs#1325]: tokio-rs#1325 [tokio-rs#1338]: tokio-rs#1338 [tokio-rs#1344]: tokio-rs#1344 [tokio-rs#1358]: tokio-rs#1358 [tokio-rs#1374]: tokio-rs#1374 [tokio-rs#1335]: tokio-rs#1335 [tokio-rs#1331]: tokio-rs#1331
Motivation
Exposing an accessor for the
FieldSet
onAttributes
can motivate the subscriber to achievesome performance improvement, such as
OpenTelemetrySubscriber
#1327.Alternative
Make
ValueSet::field_set()
bepub
instead ofpub(crate)
.