Metric Event
Description
A metric event represents a numerical operation to a time series. Operations
offered are heavily inspired by the StatsD and Prometheus models, and determine
the schema of the metric structure within Vector.
When a metric event is sent to a sink the schema will be translated into the closest equivalent format of the sink protocol.
Examples
{"name": "login.count","timestamp": "2019-11-01T21:15:47+00:00","kind": "absolute","tags": {"host": "my.host.com"},"counter": {"value": 24.2}}
Schema
The metric data model is comprised of 6 types: aggregated_histogram, aggregated_summary, counter, distribution, gauge, set.
You'll notice that certain fields are shared across all types.
kind
The metric value kind. This determines how the value is merged downstream if metrics are aggregated.
"absolute" "incremental" name
The metric name.
tags
Tags that add additional metadata or context to the metric. These are simple key/value pairs in string format and cannot be nested.
timestamp
The metric timestamp, representing when the metric was created/ingested within Vector.
type
A metric must be one of 6 types.
aggregated_histogram
Also called a "timer". A aggregated_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.
buckets
The buckets contained within this histogram.
count
The total number of values contained within the histogram.
counts
The number of values contained within each bucket.
sum
The sum of all values contained within the histogram.
aggregated_summary
Similar 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.
count
The total number of values contained within the summary.
quantiles
The quantiles contained within the summary, where where 0 ≤ quantile ≤ 1.
sum
The sum of all values contained within the summary.
values
The values contained within the summary that align with the quantiles.
counter
A single value that can only be incremented or reset to zero value, it cannot be incremented.
value
The value to increment the counter by. Can only be positive.
distribution
A dsitribution represents a distribution of sampled values.
sample_rates
The rate at which each individual value was sampled.
values
The list of values contained within the distribution.
gauge
A 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.
value
A specific point-in-time value for the gauge.
set
A set represents a count of unique values, AKA the cardinality.
values
The list of unique values.