Experimental
otelcol.processor.interval
EXPERIMENTAL: This is an experimental component. Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement. The
stability.level
flag must be set toexperimental
to use the component.
otelcol.processor.interval
aggregates metrics and periodically forwards the latest values to the next component in the pipeline.
The processor supports aggregating the following metric types:
- Monotonically increasing, cumulative sums
- Monotonically increasing, cumulative histograms
- Monotonically increasing, cumulative exponential histograms
- Gauges
- Summaries
The following metric types will not be aggregated and will instead be passed, unchanged, to the next component in the pipeline:
- All delta metrics
- Non-monotonically increasing sums
Note
Aggregating data over an interval is an inherently lossy process. You lose precision for monotonically increasing cumulative sums, histograms, and exponential histograms, but you don’t lose overall data. You can lose data when you aggregate non-monotonically increasing sums, gauges, and summaries. For example, a value can increase and decrease to the original value, and you can lose this change in the aggregation. In most cases, this type of data loss is OK. However, you can change the configuration so that these changed values pass through and are not aggregated.
Warning
After exporting, any internal state is cleared. If no new metrics come in, the next interval will export nothing.
Note
otelcol.processor.interval
is a wrapper over the upstream OpenTelemetry Collectorinterval
processor. Bug reports or feature requests will be redirected to the upstream repository, if necessary.
Usage
otelcol.processor.interval "LABEL" {
output {
metrics = [...]
}
}
Arguments
otelcol.processor.interval
supports the following arguments:
Blocks
The following blocks are supported inside the definition of otelcol.processor.interval
:
output block
The output
block configures a set of components to forward resulting telemetry data to.
The following arguments are supported:
You must specify the output
block, but all its arguments are optional.
By default, telemetry data is dropped.
Configure the metrics
, logs
, and traces
arguments accordingly to send telemetry data to other components.
passthrough block
The passthrough
block configures which metric types should be passed through instead of being aggregated.
The following attributes are supported:
debug_metrics block
The debug_metrics
block configures the metrics that this component generates to monitor its state.
The following arguments are supported:
disable_high_cardinality_metrics
is the Grafana Alloy equivalent to the telemetry.disableHighCardinalityMetrics
feature gate in the OpenTelemetry Collector.
It removes attributes that could cause high cardinality metrics.
For example, attributes with IP addresses and port numbers in metrics about HTTP and gRPC connections are removed.
Note
If configured,
disable_high_cardinality_metrics
only applies tootelcol.exporter.*
andotelcol.receiver.*
components.
level
is the Alloy equivalent to the telemetry.metrics.level
feature gate in the OpenTelemetry Collector.
Possible values are "none"
, "basic"
, "normal"
and "detailed"
.
Exported fields
The following fields are exported and can be referenced by other components:
input
accepts otelcol.Consumer
data for metrics.
Component health
otelcol.processor.interval
is only reported as unhealthy if given an invalid configuration.
Debug information
otelcol.processor.interval
does not expose any component-specific debug information.
Example
This example receives OTLP metrics and aggregates them for 30s before sending to the next exporter.
The processor immediately passes the following metric to the next processor in the chain because it is a Delta metric.
At the next interval
(15s by default), the processor passed the following metrics to the next processor in the chain.
Compatible components
otelcol.processor.interval
can accept arguments from the following components:
- Components that export OpenTelemetry
otelcol.Consumer
otelcol.processor.interval
has exports that can be consumed by the following components:
- Components that consume OpenTelemetry
otelcol.Consumer
Note
Connecting some components may not be sensible or components may require further configuration to make the connection work correctly. Refer to the linked documentation for more details.