pub struct MetricMetadata {
pub hostname: Option<Arc<str>>,
pub origin: Option<MetricOrigin>,
}
Expand description
Metric metadata.
Metadata includes all information that is not specifically related to the context or value of the metric itself, such as sample rate and timestamp.
Fields§
§hostname: Option<Arc<str>>
The hostname where the metric originated from.
origin: Option<MetricOrigin>
The metric origin.
Implementations§
Source§impl MetricMetadata
impl MetricMetadata
Sourcepub fn origin(&self) -> Option<&MetricOrigin>
pub fn origin(&self) -> Option<&MetricOrigin>
Returns the metric origin.
Sourcepub fn with_hostname(self, hostname: impl Into<Option<Arc<str>>>) -> Self
pub fn with_hostname(self, hostname: impl Into<Option<Arc<str>>>) -> Self
Set the hostname where the metric originated from.
This could be specified as part of a metric payload that was received from a client, or set internally to the hostname where this process is running.
This variant is specifically for use in builder-style APIs.
Sourcepub fn set_hostname(&mut self, hostname: impl Into<Option<Arc<str>>>)
pub fn set_hostname(&mut self, hostname: impl Into<Option<Arc<str>>>)
Set the hostname where the metric originated from.
This could be specified as part of a metric payload that was received from a client, or set internally to the hostname where this process is running.
Sourcepub fn with_source_type(self, source_type: impl Into<Option<Arc<str>>>) -> Self
pub fn with_source_type(self, source_type: impl Into<Option<Arc<str>>>) -> Self
Set the metric origin to the given source type.
Indicates the source of the metric, such as the product or service that emitted it, or the source component itself that emitted it.
This variant is specifically for use in builder-style APIs.
Sourcepub fn set_source_type(&mut self, source_type: impl Into<Option<Arc<str>>>)
pub fn set_source_type(&mut self, source_type: impl Into<Option<Arc<str>>>)
Set the metric origin to the given source type.
Indicates the source of the metric, such as the product or service that emitted it, or the source component itself that emitted it.
Sourcepub fn with_origin(self, origin: impl Into<Option<MetricOrigin>>) -> Self
pub fn with_origin(self, origin: impl Into<Option<MetricOrigin>>) -> Self
Set the metric origin to the given origin.
Indicates the source of the metric, such as the product or service that emitted it, or the source component itself that emitted it.
This variant is specifically for use in builder-style APIs.
Sourcepub fn set_origin(&mut self, origin: impl Into<Option<MetricOrigin>>)
pub fn set_origin(&mut self, origin: impl Into<Option<MetricOrigin>>)
Set the metric origin to the given origin.
Indicates the source of the metric, such as the product or service that emitted it, or the source component itself that emitted it.
Trait Implementations§
Source§impl Clone for MetricMetadata
impl Clone for MetricMetadata
Source§fn clone(&self) -> MetricMetadata
fn clone(&self) -> MetricMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MetricMetadata
impl Debug for MetricMetadata
Source§impl Default for MetricMetadata
impl Default for MetricMetadata
Source§fn default() -> MetricMetadata
fn default() -> MetricMetadata
Source§impl Display for MetricMetadata
impl Display for MetricMetadata
Source§impl PartialEq for MetricMetadata
impl PartialEq for MetricMetadata
impl Eq for MetricMetadata
impl StructuralPartialEq for MetricMetadata
Auto Trait Implementations§
impl Freeze for MetricMetadata
impl RefUnwindSafe for MetricMetadata
impl Send for MetricMetadata
impl Sync for MetricMetadata
impl Unpin for MetricMetadata
impl UnwindSafe for MetricMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
T
in a tonic::Request
Source§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Tracked
wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Tracked
wrapper. Read more