Menu
DocumentationGrafana AlloyReferenceComponentsotelcolotelcol.processor.deltatocumulative
Open source

Experimental

otelcol.processor.deltatocumulative

EXPERIMENTAL: This is an experimental component. Experimental components are subject to frequent breaking changes, and may be removed with no equivalent replacement.

otelcol.processor.deltatocumulative accepts metrics from other otelcol components and converts metrics with the delta temporality to cumulative.

Note

otelcol.processor.deltatocumulative is a wrapper over the upstream OpenTelemetry Collector deltatocumulative processor. Bug reports or feature requests will be redirected to the upstream repository, if necessary.

You can specify multiple otelcol.processor.deltatocumulative components by giving them different labels.

Usage

alloy
otelcol.processor.deltatocumulative "LABEL" {
  output {
    metrics = [...]
  }
}

Arguments

otelcol.processor.deltatocumulative supports the following arguments:

NameTypeDescriptionDefaultRequired
max_staledurationHow long to wait for a new sample before marking a stream as stale."5m"no
max_streamsnumberUpper limit of streams to track. Set to 0 to disable.0no

otelcol.processor.deltatocumulative tracks incoming metric streams. Sum and exponential histogram metrics with delta temporality are tracked and converted into cumulative temporality.

If a new sample hasn’t been received since the duration specified by max_stale, tracked streams are considered stale and dropped. max_stale must be set to a duration greater than "0s".

The max_streams attribute configures the upper limit of streams to track. If the limit of tracked streams is reached, new incoming streams are dropped. You can disable this behavior by setting max_streams to 0.

Blocks

The following blocks are supported inside the definition of otelcol.processor.deltatocumulative:

HierarchyBlockDescriptionRequired
outputoutputConfigures where to send received telemetry data.yes
debug_metricsdebug_metricsConfigures the metrics that this component generates to monitor its state.no

output block

The output block configures a set of components to forward resulting telemetry data to.

The following arguments are supported:

NameTypeDescriptionDefaultRequired
logslist(otelcol.Consumer)List of consumers to send logs to.[]no
metricslist(otelcol.Consumer)List of consumers to send metrics to.[]no
traceslist(otelcol.Consumer)List of consumers to send traces to.[]no

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.

debug_metrics block

The debug_metrics block configures the metrics that this component generates to monitor its state.

The following arguments are supported:

NameTypeDescriptionDefaultRequired
disable_high_cardinality_metricsbooleanWhether to disable certain high cardinality metrics.trueno
levelstringControls the level of detail for metrics emitted by the wrapped collector."detailed"no

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 to otelcol.exporter.* and otelcol.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:

NameTypeDescription
inputotelcol.ConsumerA value that other components can use to send telemetry data to.

input accepts otelcol.Consumer data for metrics.

Component health

otelcol.processor.deltatocumulative is only reported as unhealthy if given an invalid configuration.

Debug information

otelcol.processor.deltatocumulative does not expose any component-specific debug information.

Debug metrics

  • processor_deltatocumulative_streams_tracked (gauge): Number of streams currently tracked by the aggregation state.
  • processor_deltatocumulative_streams_limit (gauge): Upper limit of tracked streams.
  • processor_deltatocumulative_streams_evicted (counter): Total number of streams removed from tracking to ingest newer streams.
  • processor_deltatocumulative_streams_max_stale (gauge): Duration without new samples after which streams are dropped.
  • processor_deltatocumulative_datapoints_processed (counter): Total number of datapoints processed (successfully or unsuccessfully).
  • processor_deltatocumulative_datapoints_dropped (counter): Faulty datapoints that were dropped due to the reason given in the reason label.
  • processor_deltatocumulative_gaps_length (counter): Total length of all gaps in the streams, such as being due to lost in transit.

Examples

Basic usage

This example converts delta temporality metrics to cumulative before sending it to otelcol.exporter.otlp for further processing:

alloy
otelcol.processor.deltatocumulative "default" {
  output {
    metrics = [otelcol.exporter.otlp.production.input]
  }
}

otelcol.exporter.otlp "production" {
  client {
    endpoint = env("OTLP_SERVER_ENDPOINT")
  }
}

Exporting Prometheus data

This example converts delta temporality metrics to cumulative metrics before it is converted to Prometheus data, which requires cumulative temporality:

alloy
otelcol.processor.deltatocumulative "default" {
  output {
    metrics = [otelcol.exporter.prometheus.default.input]
  }
}

otelcol.exporter.prometheus "default" {
  forward_to = [prometheus.remote_write.default.receiver]
}

prometheus.remote_write "default" {
  endpoint {
    url = env("PROMETHEUS_SERVER_URL")
  }
}

Compatible components

otelcol.processor.deltatocumulative can accept arguments from the following components:

otelcol.processor.deltatocumulative has exports that can be consumed by the following components:

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.