Unroll Processor
contrib
Maintainers: @axw, @schmikei, @rnishtala-sumo
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
Supported pipelines
- Logs
How it works
The Unroll Processor processes log records through the following steps:- The processor examines each incoming log record to determine if the body contains a slice (array) structure
- For log records with slice bodies, each element of the slice is extracted and used to create a new individual log record
- Each new log record retains all the original metadata (timestamps, attributes, etc.) from the parent record
- When
recursiveis enabled, the processor will also unroll nested slices within slice elements
Config
General Config
| Field | Type | Default | Description |
|---|---|---|---|
| recursive | bool | false | Whether to recursively unroll nested slices within slice elements |
Example configuration
Examples
Basic Usage
The simplest configuration for the unroll processor:Split a log record into multiple via a delimiter
The following configuration utilizes the transform processor to first split the original string body using a delimiter, and then the unroll processor creates multiple log records from the resulting slice.Input and Output Example
Recursive Unrolling
When dealing with nested slices, you can enable recursive unrolling:Common Issues
Log records not being unrolled
- Cause: The log body is not a slice/array type
- Solution: Ensure the log body contains a slice. You may need to use the transform processor to convert string data to slices first
Unexpected number of output records
- Cause: Nested slices with
recursive: falsesetting - Solution: Enable
recursive: trueif you want to unroll nested slices, or restructure your data to avoid nested arrays
Performance issues with large slices
- Cause: Very large slices being unrolled into many individual log records
- Solution: Consider preprocessing the data to limit slice sizes or batch processing
Warnings
The Unroll Processor modifies the structure and quantity of log records in your telemetry pipeline. Consider the following warnings:- Data Volume: Unrolling slices can significantly increase the number of log records, which may impact downstream processing performance and storage requirements.
- Resource Usage: Large slices will consume more memory and CPU resources during the unrolling process.
- Downstream Compatibility: Ensure that downstream processors and exporters can handle the increased volume of log records.
- Metadata Duplication: Each unrolled log record retains the same metadata (timestamps, attributes, etc.) from the original record, which may result in data duplication.
Last generated: 2026-04-13