otel-ottl
This skill provides expertise in OpenTelemetry Transformation Language (OTTL), helping agents write and debug OTTL expressions for OpenTelemetry Collector…
Identity proven by GitHub's verified organisation badge (dash0hq)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- Apache-2.0 (permissive)
- Pin
- 51a0324pinned Oct 9, 2026
- Context cost
- about 1,400 tokenswhen the skill loads
- GitHub stars
- 96on dash0hq/agent-skills
- Scripts
- None found
What it does
“OpenTelemetry Transformation Language (OTTL) expert. Use when writing or debugging OTTL expressions for any OpenTelemetry Collector component that supports OTTL (processors, connectors, receivers, exporters). Triggers on tasks involving telemetry transformation, filtering, attribute manipulation, data redaction, sampling policies, routing, or Collector configuration. Covers syntax, contexts, functions, error handling, and performance.”
Generated summary from the skill's own text
This skill provides expertise in OpenTelemetry Transformation Language (OTTL), helping agents write and debug OTTL expressions for OpenTelemetry Collector components. It covers syntax, functions, validation workflows, error handling, and common patterns for telemetry transformation, filtering, attribute manipulation, data redaction, and sampling policies.
When to use it
- Writing OTTL expressions for Collector processors and connectors
- Debugging telemetry transformation and filtering logic
- Implementing data redaction, attribute enrichment, or cardinality normalization
- Configuring OTTL in Collector configuration files
When not to
- Working with OpenTelemetry Collector components that do not support OTTL
- Need for runtime telemetry analysis outside the Collector pipeline
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add dash0hq/agent-skills --skill otel-ottlInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install dash0hq/agent-skills otel-ottl@51a0324eb0c991f66fe9c5987799f4246ec1db44Installs the commit we checked (51a0324).
Copy by hand
Download the folder at 51a0324 and put it in .claude/skills/otel-ottl for Claude Code and in .agents/skills/otel-ottl for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install dash0@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "otel-ottl" by Dash0. Source, pinned to commit 51a0324eb0c991f66fe9c5987799f4246ec1db44: https://github.com/dash0hq/agent-skills/tree/51a0324eb0c991f66fe9c5987799f4246ec1db44/skills/otel-ottl 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/otel-ottl/ for Claude Code and .agents/skills/otel-ottl/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/dash0/otel-ottl
SKILL.md at the pin
---
name: otel-ottl
description: OpenTelemetry Transformation Language (OTTL) expert. Use when writing or debugging OTTL expressions for any OpenTelemetry Collector component that supports OTTL (processors, connectors, receivers, exporters). Triggers on tasks involving telemetry transformation, filtering, attribute manipulation, data redaction, sampling policies, routing, or Collector configuration. Covers syntax, contexts, functions, error handling, and performance.
metadata:
author: dash0
version: '1.0.0'
---
# OpenTelemetry Transformation Language (OTTL)
## Components that use OTTL
OTTL is not limited to the transform and filter processors.
Processors (transform, filter, attributes, span, tailsampling, cumulativetodelta, logdedup, lookup), connectors (routing, count, sum, signaltometrics), and the hostmetrics receiver all accept OTTL expressions.
See [components](./rules/components.md) 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):
```
set(span.attributes["region"], "us-east-1")
delete_key(resource.attributes, "internal.key")
limit(log.attributes, 10, [])
```
See [function-reference](./rules/function-reference.md) for the full list of editors and converters.
### Conditional statements
Use `where` to apply transformations conditionally:
<!-- eval:skip -->
```
span.attributes["db.statement"] = "REDACTED" where resource.attributes["service.name"] == "accounting"
```
### Nil checks
Use `nil` for absence checking (not `null`):
```
resource.attributes["service.name"] != nil
```
## Validation workflow
1. **Validate config syntax** — run `otelcol validate --config=config.yaml` to catch compilation errors before starting the Collector.
2. **Test with the debug exporter** — route transformed telemetry to a `debug` exporter and inspect the output:
```yaml
exporters:
debug:
verbosity: detailed
service:
pipelines:
traces:
receivers: [otlp]
processors: [transform]
exporters: [debug] # swap in production exporter once validated
```
3. **Set `error_mode: ignore` in production** — see [Error handling](#error-handling).
4. **Promote to production exporters** — replace `debug` with the production exporter.
## Common patterns
<!-- keep-in-sync: each entry must match a ## heading in ./rules/patterns.md -->
- [Set attributes](./rules/patterns.md#set-attributes)
- [Drop telemetry by pattern](./rules/patterns.md#drop-telemetry-by-pattern)
- [Drop stale data](./rules/patterns.md#drop-stale-data)
- [Backfill missing timestamps](./rules/patterns.md#backfill-missing-timestamps)
- [Filter processor example](./rules/patterns.md#filter-processor-example)
- [Transform processor example](./rules/patterns.md#transform-processor-example)
- [Defensive nil checks](./rules/patterns.md#defensive-nil-checks)
- [Redact sensitive data](./rules/redaction.md) — strategies: replace, mask, hash, delete, and drop.
- [Normalize high-cardinality attributes](./rules/cardinality.md) — path segments, IP masking, and attribute count/length limits.
- [Enrich telemetry with static attributes](./rules/enrichment.md)
## Error handling
### Compilation errors
Occur during processor initialization and prevent Collector startup:
- Invalid syntax (missing quotes)
- Unknown functions
- Invalid path expressions
- Type mismatches
### Runtime errors
Occur during telemetry processing:
- Accessing non-existent attributes
- Type conversion failures
- Function execution errors
### Error mode configuration
Set `error_mode` explicitly for clarity; `ignore` is the default.
| Mode | Behavior | When to use |
|------|----------|-------------|
| `ignore` (default) | Logs the error and continues to the next statement | **Production and general use** — the default for the transform and filter processors |
| `propagate` | Returns the error up the pipeline, dropping the payload from the Collector | Development and strict environments where you want to catch every error |
| `silent` | Ignores errors without logging | High-volume pipelines with known-safe transforms where error logs are noise |
```yaml
processors:
transform:
error_mode: ignore
trace_statements:
- set(span.attributes["parsed"], ParseJSON(span.attributes["json_body"]))
```
Statements are a flat list; the Collector infers the context (`span`, `metric`, `datapoint`, `log`, and so on) from the path prefixes.
Use the object form with an explicit `context:` only when a statement group mixes paths that cannot be inferred to a single context, or when you need a group-level condition or `error_mode`.
## Performance
Use `where` clauses to skip items early.
```
# BAD — runs replace_pattern on every span
replace_pattern(span.attributes["url.path"], "/\\d+", "/{id}")
# GOOD — skips spans that lack the attribute
replace_pattern(span.attributes["url.path"], "/\\d+", "/{id}") where span.attributes["url.path"] != nil
```
## References
- [OTTL Guide](https://www.dash0.com/guides/opentelemetry-transformation-language-ottl)
- [OTTL Specification](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl)
- [OTTL Functions Reference](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs)
- [OTTL Playground](https://ottl.run)
From dash0hq/agent-skills at 51a0324, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at 51a0324Files
- SKILL.md6.1 KB · 15396bd298ae
- rules/
- cardinality.md1.5 KB · dd3e2f7b1541
- components.md1.5 KB · bec3df4cd4f3
- enrichment.md722 B · 58b5c275afb5
- function-reference.md11 KB · af5acd1743f9
- patterns.md1.4 KB · 97a8d01b57fd
- redaction.md2.8 KB · cda991f4f41a
7 files, 25 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at 51a0324More from Dash0
otel-collector
This skill provides expert guidance for configuring and deploying the OpenTelemetry Collector to receive, process, and export telemetry data.
Claude Code, Codex, Cursor +4 · about 1.7K tokens · pinned 6 days ago
otel-instrumentation
This skill guides agents through configuring OpenTelemetry instrumentation across traces, metrics, and logs.
Claude Code, Codex, Cursor +4 · about 1.3K tokens · pinned 6 days ago
otel-semantic-conventions
This skill helps select and apply OpenTelemetry semantic convention attributes correctly.
Claude Code, Codex, Cursor +4 · about 1.1K tokens · pinned 6 days ago
copilot-local-dev
This skill installs and runs the Dash0 GitHub Copilot CLI plugin locally for development and testing without requiring a GitHub push or release.
Contains scripts
Claude Code, Codex, Cursor +3 · about 940 tokens · pinned 6 days ago
dash0-configure
Writes a Dash0 configuration file that connects Claude Code to Dash0 telemetry by storing OTLP credentials and team settings.
Claude Code · about 2.6K tokens · pinned 6 days ago
dash0-configure
Configures the Dash0 telemetry extension for the GitHub Copilot app by writing the OTLP URL, authentication token, team name, and dataset to a config file at…
Claude Code, Codex, Cursor +4 · about 1.5K tokens · pinned 6 days ago
Related in Observability
clickstack-otel-collector
Sets up an OpenTelemetry collector for ClickHouse Cloud's Managed ClickStack, either by deploying a new local collector via Docker or configuring an existing…
by ClickHouseOfficial publisher
Contains scripts
Claude Code, Codex, Cursor +3 · about 9.7K tokens · pinned 6 days ago
dash0-configure
This skill configures Dash0 telemetry integration for GitHub Copilot CLI by writing credentials and options to a config file, then installing a launch shell…
by Dash0Official publisher
Claude Code, Codex, Cursor +4 · about 3.4K tokens · pinned 6 days ago
debugging-executions
Debug workflow execution failures by inspecting failed nodes, re-running executions, and comparing expected versus actual values.
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 2.5K tokens · pinned 6 days ago
instance-awareness
This skill teaches the agent to resolve ambiguous requests by reading the instance's activity log and workflow history instead of asking the user to clarify.
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 1.3K tokens · pinned 6 days ago
creating-replay-vision-scanners
Guides agents through creating Replay Vision scanners, LLM probes that watch session recordings on a schedule and log findings as observations.
by PostHogOfficial publisher
Claude Code, Codex, Cursor +4 · about 3.3K tokens · pinned 6 days ago
exploring-replay-vision-observations
This skill guides agents through reading observations from Replay Vision scanners, understanding their findings across session recordings, and taking action…
by PostHogOfficial publisher
Claude Code, Codex, Cursor +4 · about 3.3K tokens · pinned 6 days ago