Classes
The following classes are available globally.
-
A counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero. For example, you can use a counter to represent the number of requests served, tasks completed, or errors.
This is the user-facing Counter API.
Its behavior depends on the
See moreCounterHandlerimplementation.Declaration
Swift
public class Counterextension Counter: CustomStringConvertible -
A FloatingPointCounter is a cumulative metric that represents a single monotonically increasing FloatingPointCounter whose value can only increase or be reset to zero. For example, you can use a FloatingPointCounter to represent the number of requests served, tasks completed, or errors. FloatingPointCounter is not supported by all metrics backends, however a default implementation is provided which accumulates floating point values and records increments to a standard Counter after crossing integer boundaries.
This is the user-facing FloatingPointCounter API.
Its behavior depends on the
See moreFloatingCounterHandlerimplementation.Declaration
Swift
public class FloatingPointCounterextension FloatingPointCounter: CustomStringConvertible -
A recorder collects observations within a time window (usually things like response sizes) and can provide aggregated information about the data sample, for example, count, sum, min, max and various quantiles.
This is the user-facing Recorder API.
Its behavior depends on the
See moreRecorderHandlerimplementation.Declaration
Swift
public class Recorderextension Recorder: CustomStringConvertible -
A gauge is a metric that represents a single numerical value that can arbitrarily go up and down. Gauges are typically used for measured values like temperatures or current memory usage, but also “counts” that can go up and down, like the number of active threads. Gauges are modeled as
See moreRecorderwith a sample size of 1 and that does not perform any aggregation.Declaration
Swift
public class Gauge : Recorder -
A timer collects observations within a time window (usually things like request durations) and provides aggregated information about the data sample, for example, min, max and various quantiles. It is similar to a
Recorderbut specialized for values that represent durations.This is the user-facing Timer API.
Its behavior depends on the
See moreTimerHandlerimplementation.Declaration
Swift
public class Timerextension Timer: CustomStringConvertible
-
A pseudo-metrics handler that can be used to send messages to multiple other metrics handlers.
See moreDeclaration
Swift
public final class MultiplexMetricsHandler : MetricsFactory -
Ships with the metrics module, used for initial bootstrapping.
See moreDeclaration
Swift
public final class NOOPMetricsHandler : MetricsFactory, CounterHandler, FloatingPointCounterHandler, RecorderHandler, TimerHandler
View on GitHub
Install in Dash
Classes Reference