Expand description
This crate contains core trait and struct definitions for metrique-writer,
to allow for compatibility between (future) different major versions
of metrique-writer. You should be using metrique-writer directly rather than
this crate.
Re-exports§
pub use crate::entry::BoxEntry;pub use crate::entry::Entry;pub use crate::entry::EntryConfig;pub use crate::entry::EntryWriter;pub use crate::global::GlobalEntrySink;pub use crate::sample::SampleGroup;pub use crate::sink::AnyEntrySink;pub use crate::sink::BoxEntrySink;pub use crate::sink::EntrySink;pub use crate::stream::EntryIoStream;pub use crate::stream::IoStreamError;pub use crate::unit::Convert;pub use crate::unit::Unit;pub use crate::value::Distribution;pub use crate::value::MetricFlags;pub use crate::value::MetricValue;pub use crate::value::Observation;pub use crate::value::Value;pub use crate::value::ValueWriter;
Modules§
- config
- Contains configurations that are mostly useful for EMF-format metrics
- entry
- This module contains the Entry trait, which represents an entry that can be written to an EntryWriter in order to emit metrics
- format
- Contains the
Formattrait. - global
- Contains the
global_entry_sinkmacro, which can be used to defineGlobalEntrySinks which are a rendezvous points between metric sources and metric sinks. - sample
- Defines the
SampledFormattrait, which allows for formats that can be sampled. - sink
- Contains the
EntrySinktrait, which provides sinks into which metric entries can be written. UnlikeEntryIoStream, these can be asynchronous. - stream
- Contains the EntryIoStream trait, which writes entries to a destination synchronously.
- unit
- Contains utilities for attaching Units (such as percents, kilobytes, or seconds) to metrics. Conversion between different units is handled by Convert.
- value
- A Value is something that can be written to a given metric field.
Macros§
- global_
entry_ sink - Define a new global
AttachGlobalEntrySinkthat can be referenced by type name in all threads.
Structs§
- Validation
Error - An error type that describes why an
crate::Entryisn’t valid. This can be because it violated general contracts (e.g. writing multiple values with the same name) or because it violated a format-specific contract (e.g. using a reserved property name). - Validation
Error Builder - Builder to record validation failures over time and bundle them into a single
ValidationErrorNote that if no validation failures are added to the builder,ValidationErrorBuilder::build()will returnNone, which is useful to track if a side-effect produced any errors.