Available on crate feature
metrics
only.Expand description
Metrics Export
Re-exports§
pub use stdout::stdout;
Modules§
- stdout
- Stdout Metrics Exporter
Structs§
- Accumulation
- A container for the exported data for a single metric instrument and attribute
set, as prepared by an
Accumulator
for theProcessor
. - Buckets
- Buckets represent histogram buckets boundaries and counts.
- Metadata
- A container for the common elements for exported metric data that are shared
by the
Accumulator
->Processor
andProcessor
->Exporter
steps. - Record
- A container for the exported data for a single metric instrument and attribute
set, as prepared by the
Processor
for theExporter
. This includes the effective start and end time for the aggregation.
Enums§
- Export
Kind - Indicates the kind of data exported by an exporter. These bits may be OR-d together when multiple exporters are in use.
- Export
Kind Selector - Strategies for selecting which export kind is used for an instrument.
Traits§
- Aggregator
- Aggregator implements a specific aggregation behavior, i.e., a behavior to track a sequence of updates to an instrument. Sum-only instruments commonly use a simple Sum aggregator, but for the distribution instruments (ValueRecorder, ValueObserver) there are a number of possible aggregators with different cost and accuracy tradeoffs.
- Aggregator
Selector - AggregatorSelector supports selecting the kind of
Aggregator
to use at runtime for a specific metric instrument. - Checkpoint
Set - CheckpointSet allows a controller to access a complete checkpoint of
aggregated metrics from the Processor. This is passed to the
Exporter
which may then usetry_for_each
to iterate over the collection of aggregated metrics. - Checkpointer
- The interface used by a
Controller
to coordinate theProcessor
withAccumulator
(s) andExporter
(s). Thestart_collection
andfinish_collection
methods start and finish a collection interval.Controller
s call theAccumulator
(s) during collection to processAccumulation
s. - Count
- Count returns the number of values that were aggregated.
- Export
Kind For - ExportKindSelector is a sub-interface of Exporter used to indicate whether the Processor should compute Delta or Cumulative Aggregations.
- Exporter
- Exporter handles presentation of the checkpoint of aggregate metrics. This is the final stage of a metrics export pipeline, where metric data are formatted for a specific system.
- Histogram
- Histogram returns the count of events in pre-determined buckets.
- Last
Value - LastValue returns the latest value that was aggregated.
- Locked
Processor - A locked processor.
- Max
- Max returns the maximum value over the set of values that were aggregated.
- Min
- Min returns the minimum value over the set of values that were aggregated.
- MinMax
SumCount - MinMaxSumCount supports the Min, Max, Sum, and Count interfaces.
- Points
- Points return the raw set of values that were aggregated.
- Processor
- Processor is responsible for deciding which kind of aggregation to use (via
aggregation_selector
), gathering exported results from the SDK during collection, and deciding over which dimensions to group the exported data. - Subtractor
- An optional interface implemented by some Aggregators. An Aggregator must
support
subtract()
in order to be configured for a Precomputed-Sum instrument (SumObserver, UpDownSumObserver) using a DeltaExporter. - Sum
- Sum returns an aggregated sum.
Functions§
- accumulation
- Allows
Accumulator
implementations to construct newAccumulation
s to send toProcessor
s. TheDescriptor
,Attributes
,Resource
, andAggregator
represent aggregate metric events received over a single collection period. - record
- Allows
Processor
implementations to construct export records. TheDescriptor
,Attributes
, andAggregator
represent aggregate metric events received over a single collection period.