Static metrics
Publish statically configured metrics on an interval
Configuration
Example configurations
{
"sources": {
"my_source_id": {
"type": "static_metrics"
}
}
}
[sources.my_source_id]
type = "static_metrics"
sources:
my_source_id:
type: static_metrics
{
"sources": {
"my_source_id": {
"type": "static_metrics",
"interval_secs": 1,
"metrics": {
"kind": "absolute",
"name": null,
"value": null
},
"namespace": "static"
}
}
}
[sources.my_source_id]
type = "static_metrics"
interval_secs = 1
namespace = "static"
[sources.my_source_id.metrics]
kind = "absolute"
sources:
my_source_id:
type: static_metrics
interval_secs: 1
metrics:
kind: absolute
name: null
value: null
namespace: static
metrics
optional [object]internal_metrics
source.metrics.kind
required string literal enumOption | Description |
---|---|
absolute | Absolute metric. |
incremental | Incremental metric. |
metrics.name
required string literalmetrics.tags
optional objectmetrics.tags.*
required string literalmetrics.value
required objectmetrics.value.aggregated_histogram
required objectA set of observations which are counted into buckets.
It also contains the total count of all observations and their sum to allow calculating the mean.
metrics.value.aggregated_histogram.buckets
required [object]A histogram bucket.
The buckets within this histogram.
metrics.value.aggregated_histogram.count
required uintmetrics.value.aggregated_histogram.sum
required floatmetrics.value.aggregated_summary
required objectA set of observations which are represented by quantiles.
Each quantile contains the upper value of the quantile (0 <= φ <= 1). It also contains the total count of all observations and their sum to allow calculating the mean.
metrics.value.aggregated_summary.count
required uintmetrics.value.aggregated_summary.quantiles
required [object]A single quantile observation.
The quantiles measured from this summary.
metrics.value.aggregated_summary.sum
required floatmetrics.value.counter
required objectmetrics.value.counter.value
required floatmetrics.value.distribution
required objectmetrics.value.distribution.samples
required [object]metrics.value.distribution.statistic
required string literal enumOption | Description |
---|---|
histogram | A histogram representation. |
summary | Corresponds to Datadog’s Distribution Metric https://docs.datadoghq.com/developers/metrics/types/?tab=distribution#definition |
metrics.value.gauge
required objectmetrics.value.gauge.value
required floatmetrics.value.set
required objectmetrics.value.set.values
required [string]metrics.value.sketch
required objectA data structure that can answer questions about the cumulative distribution of the contained samples in space-efficient way.
Sketches represent the data in a way that queries over it have bounded error guarantees without needing to hold every single sample in memory. They are also, typically, able to be merged with other sketches of the same type such that client-side and server-side aggregation can be accomplished without loss of accuracy in the queries.
metrics.value.sketch.sketch
required objectDDSketch implementation based on the Datadog Agent.
While DDSketch has open-source implementations based on the white paper, the version used in the Datadog Agent itself is subtly different. This version is suitable for sending directly to Datadog’s sketch ingest endpoint.
A split representation of sketch bins.
The bins within the sketch.
namespace
optional string literalstatic
Outputs
<component_id>
Output Data
Metrics
counter
counterdistribution
distributionTelemetry
Metrics
linkcomponent_discarded_events_total
counterfilter
transform, or false if due to an error.component_errors_total
countercomponent_received_bytes_total
countercomponent_received_event_bytes_total
countercomponent_received_events_count
histogramA histogram of the number of events passed in each internal batch in Vector’s internal topology.
Note that this is separate than sink-level batching. It is mostly useful for low level debugging performance issues in Vector due to small internal batches.
component_received_events_total
countercomponent_sent_event_bytes_total
countercomponent_sent_events_total
countersource_lag_time_seconds
histogramExamples
Emit a heartbeat
Given this event...
sources:
my_source_id:
type: static_metrics
metrics:
- name: heartbeat
kind: absolute
value:
gauge:
value: 1
tags:
env: ${ENV}
[sources.my_source_id]
type = "static_metrics"
[[sources.my_source_id.metrics]]
name = "heartbeat"
kind = "absolute"
[sources.my_source_id.metrics.value.gauge]
value = 1
[sources.my_source_id.metrics.tags]
env = "${ENV}"
{
"sources": {
"my_source_id": {
"type": "static_metrics",
"metrics": [
{
"name": "heartbeat",
"kind": "absolute",
"value": {
"gauge": {
"value": 1
}
},
"tags": {
"env": "${ENV}"
}
}
]
}
}
}
{
"gauge": {
"value": 1
},
"kind": "absolute",
"name": "heartbeat",
"namespace": "static",
"tags": {
"env": "${ENV}"
},
"timestamp": "2024-09-10T19:04:58Z"
}