Transform OTel Data
3 minute read
Overview
When OTLP data enters an Edge Delta pipeline, it carries OpenTelemetry structure: resource attributes, trace context, semantic conventions, and a body field with your actual data. Some destinations expect this structure. Others do not.
Edge Delta provides two processors for working with OTel-formatted data:
- Deotel: Strips the OTLP wrapper entirely, extracting only the core content
- OTTL Transform: Modifies individual fields within the OTel structure using OpenTelemetry Transformation Language statements
Remove OTel metadata (Deotel)
The Deotel (De-OpenTelemetry) processor extracts the core content from OpenTelemetry formatted telemetry data, removing all OTLP wrapper metadata. It takes a specified field (typically body) from the OpenTelemetry structure and outputs only that field’s content, discarding resource attributes, trace context, and other metadata.
The Deotel processor is ideal for:
- Sending logs to legacy systems that don’t support OTLP format
- Forwarding data to custom applications in their original format
- Reducing data size by removing OpenTelemetry metadata
Do not use the Deotel processor when:
- Your destination supports OpenTelemetry/OTLP format
- You need trace context for distributed tracing
- You need resource metadata for infrastructure correlation
- Your downstream system benefits from OpenTelemetry semantic conventions
Configuration
The Deotel processor extracts a single field from the OTel structure and discards everything else. The field_path parameter specifies which field to preserve, typically body.
- name: deotel_processor
type: sequence
processors:
- type: deotel
metadata: '{"id":"unique_id","type":"deotel","name":"Deotel"}'
data_types:
- log
field_path: body
Note: The specified field must contain an object (map) with key-value pairs. Deotel does not work with arrays, strings, or primitive types. See the Deotel Processor reference for requirements and workarounds.
For the full parameter reference and input/output examples, see Deotel Processor.
Transform with OTTL
OTTL (OpenTelemetry Transformation Language) statements let you modify OTel data without stripping the structure. You can rename attributes, extract nested fields, parse strings, and apply conditional logic.
Common OTTL use cases with OTel data:
- Parse a JSON string body into a structured object
- Copy resource attributes into the body for downstream use
- Rename or delete specific attributes
- Add conditional transformations based on attribute values
For OTTL syntax and examples, see OTTL Statements.
Combine OTTL and Deotel
If you need to preserve some OpenTelemetry metadata in the output, use OTTL Transform before Deotel to merge important fields into the body or whichever field you configure the deotel processor to preserve:
processors:
- type: ottl_transform
statements: |
set(body, ParseJSON(body)) where IsString(body)
set(body["service"], resource["service.name"]) where IsMap(body)
set(body["pod"], resource["k8s.pod.name"]) where IsMap(body)
- type: deotel
field_path: body
This pattern is useful when you need a simplified output format but also need to preserve specific metadata such as the service name or pod name from the OTel structure.
See also
- Deotel Processor for the full parameter reference
- Deotel Troubleshooting for common issues
- OTTL Statements for transformation syntax
- OTTL Language Guide for available functions and syntax