Struct InstrumentationScope
#[non_exhaustive]pub struct InstrumentationScope { /* private fields */ }
Available on crate feature
opentelemetry
only.Expand description
Information about a library or crate providing instrumentation.
An instrumentation scope should be named to follow any naming conventions of the instrumented library (e.g. ‘middleware’ for a web framework).
See the instrumentation libraries spec for more information.
Implementations§
§impl InstrumentationScope
impl InstrumentationScope
pub fn builder<T>(name: T) -> InstrumentationScopeBuilder
pub fn builder<T>(name: T) -> InstrumentationScopeBuilder
Create a new builder to create an InstrumentationScope
pub fn schema_url(&self) -> Option<&str>
pub fn schema_url(&self) -> Option<&str>
Returns the Schema URL used by this library.
pub fn attributes(&self) -> impl Iterator<Item = &KeyValue>
pub fn attributes(&self) -> impl Iterator<Item = &KeyValue>
Returns the instrumentation scope attributes to associate with emitted telemetry.
Trait Implementations§
§impl Clone for InstrumentationScope
impl Clone for InstrumentationScope
§fn clone(&self) -> InstrumentationScope
fn clone(&self) -> InstrumentationScope
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for InstrumentationScope
impl Debug for InstrumentationScope
§impl Default for InstrumentationScope
impl Default for InstrumentationScope
§fn default() -> InstrumentationScope
fn default() -> InstrumentationScope
Returns the “default value” for a type. Read more
§impl Hash for InstrumentationScope
impl Hash for InstrumentationScope
§impl PartialEq for InstrumentationScope
impl PartialEq for InstrumentationScope
impl Eq for InstrumentationScope
Auto Trait Implementations§
impl Freeze for InstrumentationScope
impl RefUnwindSafe for InstrumentationScope
impl Send for InstrumentationScope
impl Sync for InstrumentationScope
impl Unpin for InstrumentationScope
impl UnwindSafe for InstrumentationScope
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.