Incremental to Absolute
Convert incremental metrics to absolute
Configuration
Example configurations
{
"transforms": {
"my_transform_id": {
"type": "incremental_to_absolute",
"inputs": [
"my-source-or-transform-id"
]
}
}
}[transforms.my_transform_id]
type = "incremental_to_absolute"
inputs = [ "my-source-or-transform-id" ]
transforms:
my_transform_id:
type: incremental_to_absolute
inputs:
- my-source-or-transform-id
{
"transforms": {
"my_transform_id": {
"type": "incremental_to_absolute",
"inputs": [
"my-source-or-transform-id"
]
}
}
}[transforms.my_transform_id]
type = "incremental_to_absolute"
inputs = [ "my-source-or-transform-id" ]
transforms:
my_transform_id:
type: incremental_to_absolute
inputs:
- my-source-or-transform-id
cache
optional objectConfiguration for the internal metrics cache used to normalize a stream of incremental metrics into absolute metrics.
By default, incremental metrics are evicted after 5 minutes of not being updated. The next incremental value will be reset.
cache.max_bytes
optional uintcache.max_events
optional uintcache.time_to_live
optional uint300(seconds)graph
optional objectExtra graph configuration
Configure output for component when generated with graph command
graph.node_attributes
optional objectNode attributes to add to this component’s node in resulting graph
They are added to the node as provided
graph.node_attributes.*
required string literalinputs
required [string]A list of upstream source or transform IDs.
Wildcards (*) are supported.
See configuration for more info.
Input Types
Outputs
<component_id>
Output Types
Metrics
metric event.Telemetry
Metrics
linkcomponent_discarded_events_total
counterfilter transform, or false if due to an error.component_errors_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
countertransform_buffer_max_byte_size
gaugetransform_buffer_max_event_size
gaugetransform_buffer_utilization
histogramtransform_buffer_utilization_level
gaugeutilization
gaugeExamples
Convert incremental metrics to absolute
Given this event...[{"metric":{"counter":{"value":1.1},"kind":"incremental","name":"counter.1","tags":{"host":"my.host.com"},"timestamp":"2021-07-12T07:58:44.223543Z"}},{"metric":{"counter":{"value":1.1},"kind":"incremental","name":"counter.1","tags":{"host":"my.host.com"},"timestamp":"2021-07-12T07:58:45.223543Z"}},{"metric":{"counter":{"value":1.1},"kind":"incremental","name":"counter.1","tags":{"host":"my.host.com"},"timestamp":"2021-07-12T07:58:46.223543Z"}},{"metric":{"counter":{"value":1.1},"kind":"incremental","name":"counter.1","tags":{"host":"my.host.com"},"timestamp":"2021-07-12T08:59:45.223543Z"}}]transforms:
my_transform_id:
type: incremental_to_absolute
inputs:
- my-source-or-transform-id
cache:
time_to_live: 10
[transforms.my_transform_id]
type = "incremental_to_absolute"
inputs = [ "my-source-or-transform-id" ]
[transforms.my_transform_id.cache]
time_to_live = 10
{
"transforms": {
"my_transform_id": {
"type": "incremental_to_absolute",
"inputs": [
"my-source-or-transform-id"
],
"cache": {
"time_to_live": 10
}
}
}
}[{"metric":{"counter":{"value":1.1},"kind":"absolute","name":"counter.1","tags":{"host":"my.host.com"},"timestamp":"2021-07-12T07:58:44.223543Z"}},{"metric":{"counter":{"value":2.2},"kind":"absolute","name":"counter.1","tags":{"host":"my.host.com"},"timestamp":"2021-07-12T07:58:45.223543Z"}},{"metric":{"counter":{"value":3.3},"kind":"absolute","name":"counter.1","tags":{"host":"my.host.com"},"timestamp":"2021-07-12T07:58:46.223543Z"}},{"metric":{"counter":{"value":1.1},"kind":"absolute","name":"counter.1","tags":{"host":"my.host.com"},"timestamp":"2021-07-12T08:59:45.223543Z"}}]How it works
Advantages of Use
Converting incremental metrics to absolute metrics has two major benefits. First, incremental metrics require the entire history to determine the current state, as they depend on previous values to calculate changes. Each absolute metric represents a complete state, making it easier to view historical data accurately for components like the File sink, where some files might end up missing or out of order. Second, it can reduce overhead for downstream components like Prometheus Remote Write, which internally converts incremental to absolute metrics. Converting to absolute metric with this transform prevents the creation of duplicate caches when sending to multiple Prometheus Remote Write sinks.
The conversion is performed based on the order in which incremental metrics are received, not their timestamps. Moreover, absolute metrics received by this transform are emitted unchanged.