pub enum AttributeValue {
String(MetaString),
Bool(bool),
Int(i64),
Float(f64),
Bytes(Vec<u8>),
Array(Vec<AttributeValue>),
KeyValueList(Vec<(MetaString, AttributeValue)>),
}Expand description
Typed value for attributes at every level of the trace model: span attributes, span event attributes, span link attributes, and trace-level attributes.
Covers all variants carried by the V1 APM idx wire format (RawAnyValue).
Variants§
String(MetaString)
String-valued attribute.
Bool(bool)
Boolean attribute.
Int(i64)
Integer attribute.
Float(f64)
Floating-point attribute.
Bytes(Vec<u8>)
Raw bytes attribute.
Array(Vec<AttributeValue>)
Array of attribute values (may be heterogeneous).
KeyValueList(Vec<(MetaString, AttributeValue)>)
List of key-value pairs.
Implementations§
Source§impl AttributeValue
impl AttributeValue
Sourcepub fn as_string(&self) -> Option<&MetaString>
pub fn as_string(&self) -> Option<&MetaString>
Returns the inner string if this is a String variant.
Sourcepub fn as_float(&self) -> Option<f64>
pub fn as_float(&self) -> Option<f64>
Returns the inner float if this is a Float variant.
Returns Some only when the stored variant is Float. For numeric semantic tags
where the source may store an integer (for example, sampling priority, _sample_rate,
_top_level), use as_num instead.
Trait Implementations§
Source§impl Clone for AttributeValue
impl Clone for AttributeValue
Source§fn clone(&self) -> AttributeValue
fn clone(&self) -> AttributeValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AttributeValue
impl Debug for AttributeValue
Source§impl PartialEq for AttributeValue
impl PartialEq for AttributeValue
Source§fn eq(&self, other: &AttributeValue) -> bool
fn eq(&self, other: &AttributeValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AttributeValue
Auto Trait Implementations§
impl Freeze for AttributeValue
impl RefUnwindSafe for AttributeValue
impl Send for AttributeValue
impl Sync for AttributeValue
impl Unpin for AttributeValue
impl UnsafeUnpin for AttributeValue
impl UnwindSafe for AttributeValue
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Instruments this type by attaching the given resource group token, returning a
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Instruments this type by attaching the current resource group, returning a
Tracked wrapper. Read more