Metric events
Schema
A Vector metric event represents a numerical operation performed on a time series. Unlike other tools, metrics in Vector are first class citizens, they are not represented as structured logs. This makes them interoperable with various metrics services without the need for any transformation.
Vector’s metric data model favors accuracy and correctness over ideological purity. Therefore, Vector’s metric types are a conglomeration of various metric types found in the wild, such as Prometheus and StatsD. This ensures metric data is correctly interoperable between systems.
Options
counter
common optional tableA single value that can be incremented or reset to a zero value but not decremented.
distribution
common optional tableA distribution represents a distribution of
sampled values. It is used with services
that support global histograms and summaries.
gauge
common optional tableA gauge represents a point-in-time value
that can increase and decrease. Vector’s
internal gauge type represents changes to
that value. Gauges should be used to track
fluctuations in values, like current memory
or CPU usage.
histogram
common optional tableAlso called a timer. A histogram samples
observations (usually things like request
durations or response sizes) and counts them
in configurable buckets. It also provides a
sum of all observed values.
interval_ms
optional uintThe time interval represented by the value of this metric.
kind
required stringThe metric value kind.
name
required stringThe metric name.
namespace
optional stringThe metric namespace. Depending on the service, this will prepend the name or use native namespacing facilities.
set
common optional tableA set represents an array of unique values.
values
required arrayThe list of unique values.
summary
common optional tableSimilar to a histogram, a summary samples
observations (usually things like request
durations and response sizes). While it also
provides a total count of observations and a
sum of all observed values, it calculates
configurable quantiles over a sliding time
window.
tags
required tableThe metric tags, represented as a mapping of tag names to either a single value or a list of values, where each value is either a string or
null
.*
optional *A mapping of tag names to either a single value or a list of values, where each value is either a string or
null
.timestamp
required timestampThe metric timestamp; when the metric was created.