pub struct MetricPacket<'a> {
pub metric_name: &'a str,
pub tags: RawTags<'a>,
pub values: MetricValues,
pub num_points: u64,
pub timestamp: Option<u64>,
pub local_data: Option<&'a str>,
pub external_data: Option<&'a str>,
pub cardinality: Option<OriginTagCardinality>,
pub unit: Option<&'static str>,
}Expand description
A DogStatsD metric packet.
See the DogStatsD datagram format reference for the wire format and the protocol versions that introduced each field.
Fields§
§metric_name: &'a strName of the metric.
Tags attached to the metric.
values: MetricValuesThe metric kind (counter, gauge, rate, etc.) and its sample points.
num_points: u64Number of sample points represented by values.
timestamp: Option<u64>Optional Unix timestamp for the sample, in seconds (protocol v1.3).
local_data: Option<&'a str>Local Data attached to the metric, carried in the c: field (protocol v1.2, extended in v1.4).
Identifies the workload that emitted the metric. Carries a container ID (ci-<id>) or, when unavailable, a
cgroup node inode (in-<inode>).
external_data: Option<&'a str>External Data attached to the metric, carried in the e: field (protocol v1.5).
Used to convey a richer blob of workload identity data resolved by the receiver.
cardinality: Option<OriginTagCardinality>Cardinality hint for origin tag enrichment, carried in the card: field (protocol v1.6).
Specifies which origin tags the receiver should attach to the metric.
unit: Option<&'static str>Unit for this metric, if any.
Auto Trait Implementations§
impl<'a> Freeze for MetricPacket<'a>
impl<'a> RefUnwindSafe for MetricPacket<'a>
impl<'a> Send for MetricPacket<'a>
impl<'a> Sync for MetricPacket<'a>
impl<'a> Unpin for MetricPacket<'a>
impl<'a> UnsafeUnpin for MetricPacket<'a>
impl<'a> UnwindSafe for MetricPacket<'a>
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Tracked wrapper. Read moreSource§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Tracked wrapper. Read more