Skip to content
dash0hq avatar

Otel Ottl

Expert guidance for writing and debugging OpenTelemetry Transformation Language expressions across Collector components.

CCM score
70 of 100
skills.sh installs
670
GitHub stars
102
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers OTTL syntax, the telemetry contexts (resource, scope, span, metric, datapoint, log), and the converter and editor function families
  • Includes a validation workflow using otelcol validate and the debug exporter, plus common patterns for redaction, cardinality, and enrichment
  • Enforces explicit error_mode choices, noting that defaults differ across the transform, filter, routing, and count components
  • Designed for Collector operators writing processor, connector, or exporter expressions for filtering, routing, sampling, and attribute manipulation

Install

$ npx -y skills add dash0hq/agent-skills --skill otel-ottl -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

OpenTelemetry Transformation Language (OTTL)

Components that use OTTL

OTTL is not limited to the transform and filter processors. Processors (transform, filter, tailsampling, logdedup) and connectors (routing, count, sum, signaltometrics) accept OTTL expressions. See components for the full list with use cases.

OTTL syntax

Path expressions

Navigate telemetry data using dot notation:

span.name
span.attributes["http.method"]
resource.attributes["service.name"]

Contexts (first path segment): resource, scope, span, spanevent, metric, datapoint, log.

Enumerations

Use int64 constants for enumeration fields:

span.status.code == STATUS_CODE_ERROR
span.kind == SPAN_KIND_SERVER

Operators

Assignment: = — Comparison: ==, !=, >, <, >=, <= — Logical: and, or, not

Functions

Converters (uppercase, return values):

ToUpperCase(span.attributes["http.request.method"])
Substring(log.body.string, 0, 1024)
Concat(["prefix", span.attributes["request.id"]], "-")
IsMatch(metric.name, "^k8s\\..*$")

Editors (lowercase, modify data in-place):

Details

Repository
github.com/dash0hq/agent-skills
Category
DevOps & Cloud
First seen
Jun 3, 2026

Questions

What does the otel-ottl skill do?

otel-ottl is an expert guide for writing and debugging OpenTelemetry Transformation Language expressions in the OpenTelemetry Collector. It covers syntax, contexts, functions, error handling and performance for filtering, attribute manipulation, redaction, sampling and routing.

How do I install the otel-ottl skill?

Run npx -y skills add dash0hq/agent-skills --skill otel-ottl -y in a project to install otel-ottl. Once installed, the agent loads otel-ottl when a task involves writing or debugging OTTL expressions.

Which Collector components can use OTTL expressions with this skill?

otel-ottl covers any OpenTelemetry Collector component that accepts OTTL, not only the transform and filter processors. It names processors such as tailsampling and logdedup, and connectors such as routing, count and signaltometrics.

How do I safely test OTTL expressions written with otel-ottl?

otel-ottl recommends running otelcol validate --config=config.yaml to catch compilation errors first. It then suggests routing transformed telemetry to a debug exporter with detailed verbosity before swapping in the production exporter.

More from dash0hq/agent-skills

All 4

Similar to Otel Ottl

More DevOps & Cloud