Trait opentelemetry::labels::Encoder [−][src]
pub trait Encoder: Debug { fn encode(&self, labels: &mut dyn Iterator<Item = (&Key, &Value)>) -> String; fn id(&self) -> EncoderId; }
This is supported on crate feature
metrics
only.Expand description
Encoder is a mechanism for serializing a label set into a specific string representation that supports caching, to avoid repeated serialization. An example could be an exporter encoding the label set into a wire representation.
Required methods
Encode returns the serialized encoding of the label set using its Iterator. This result may be cached.