Struct Metric Attributes

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.

pub struct MetricAttributes(/* private fields */);

A deterministic map of typed OpenTelemetry metric attributes.

Implementations

impl MetricAttributes

impl MetricAttributes

insert

pub fn insert(&mut self, key: String, value: AttributeValue)

Insert or replace a typed metric attribute.

iter

pub fn iter(&self) -> impl Iterator<Item = (&String, &AttributeValue)>

Iterate over validated attribute name and value pairs.

is_empty

pub fn is_empty(&self) -> bool

Return whether this attribute set is empty.

Trait Implementations

impl Clone for MetricAttributes

impl Clone for MetricAttributes

clone

fn clone(&self) -> MetricAttributes

clone_from

fn clone_from(&mut self, source: &Self)

impl Debug for MetricAttributes

impl Debug for MetricAttributes

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for MetricAttributes

impl Default for MetricAttributes

default

fn default() -> MetricAttributes

impl PartialEq for MetricAttributes

impl PartialEq for MetricAttributes

eq

fn eq(&self, other: &MetricAttributes) -> bool

ne

fn ne(&self, other: &Rhs) -> bool

impl TryFrom<Option<&Value>> for MetricAttributes

impl TryFrom<Option<&Value>> for MetricAttributes

Error

type Error = MetricValidationError

try_from

fn try_from(attributes: Option<&Json>) -> Result<Self, Self::Error>

impl StructuralPartialEq for MetricAttributes

impl StructuralPartialEq for MetricAttributes