OpenTelemetry Transformation Language (OTTL) expert for writing and debugging telemetry transformations in the OpenTelemetry Collector.

Apache-2.0Auto-check passedDevOps & Cloud

Install Otel Ottl

skills CLI
$ npx skills add ollygarden/opentelemetry-agent-skills --skill otel-ottl -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ollygarden/opentelemetry-agent-skills otel-ottl --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ollygarden/opentelemetry-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/otel-ottl .claude/skills/otel-ottl && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
otel-ottl
GitHub stars
106
Token cost
~1.7k tokens
SKILL.md length
733 words
Files
5 (incl. references)
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

OpenTelemetry Transformation Language (OTTL) expert for writing and debugging telemetry transformations in the OpenTelemetry Collector.

  • Works in 5 steps: Choose the component. transform… → Choose the lowest usable context. Lower… → Verify every emitted function, then… → …
  • Reviewing transform
  • SKILL.md covers Workflow, Load only what the task needs, Safety and correctness gates and Frequent syntax traps, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Otel Ottl is an agent skill from ollygarden/opentelemetry-agent-skills. OpenTelemetry Transformation Language (OTTL) expert for writing and debugging telemetry transformations in the OpenTelemetry Collector. Use when authoring or reviewing transform, filter, tailsampling processor configs or routing connector configs, debugging OTTL syntax or semantics, transforming traces, metrics, logs, or profiles, or converting data-processing requirements into OTTL statements.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `evals/evals.json`, `references/contexts.md` and `references/functions.md`).

It sits in DevOps & Cloud, covering Observability. It works with OpenTelemetry. The repository describes itself as: Vendor-neutral OpenTelemetry skills for AI coding agents like Claude Code, Cursor, and Codex, grounded in upstream sources. The licence is Apache-2.0.

When your agent uses it

  • Reviewing transform
  • Tailsampling processor configs
  • Routing connector configs
  • Debugging OTTL syntax

Example prompts

  • “/otel-ottl”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Choose the component. transform rewrites, filter drops, tail_sampling decides whether
  2. Choose the lowest usable context. Lower contexts can read their parents (for example, a span
  3. Verify every emitted function, then write the statement. Confirm each function's exact
  4. Set error behavior deliberately. ignore logs statement errors and continues; silent
  5. Verify end to end. Validate the exact Collector version, then send known telemetry and inspect

What it can do on your machine

Read from SKILL.md and the folder at commit 9900032. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are ottl).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Otel Ottl loads about 1.7k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 104 tokens; SKILL.md has 733 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ollygarden/opentelemetry-agent-skills at commit 9900032, republished under its Apache-2.0 licence (© ollygarden). 733 words, ~1,687 tokens.

Download SKILL.mdSave it as .claude/skills/otel-ottl/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
otel-ottl
description
OpenTelemetry Transformation Language (OTTL) expert for writing and debugging telemetry transformations in the OpenTelemetry Collector. Use when authoring or reviewing `transform`, `filter`, `tail_sampling` processor configs or `routing` connector configs, debugging OTTL syntax or semantics, transforming traces, metrics, logs, or profiles, or converting data-processing requirements into OTTL statements.

OpenTelemetry Transformation Language (OTTL)

OTTL transforms or selects telemetry inside Collector components. This skill is pinned to collector-contrib v0.162.0. Function, path, default, and feature-gate availability varies by release; when the user's version differs, verify against the matching upstream tag.

Workflow

  1. Choose the component. transform rewrites, filter drops, tail_sampling decides whether to retain traces, and routing sends telemetry to pipelines. A component controls its available contexts and functions.
  2. Choose the lowest usable context. Lower contexts can read their parents (for example, a span can read resource.attributes), but parents cannot read children. Use datapoint for point attributes instead of traversing metric.data_points.
  3. Verify every emitted function, then write the statement. Confirm each function's exact identifier and signature in references/functions.md. If an identifier is absent, treat it as unsupported instead of deriving or substituting a plausible name. An editor such as set or delete_key mutates data and may have a where condition. Converters such as ParseJSON and IsMatch return values; they do not mutate.
  4. Set error behavior deliberately. ignore logs statement errors and continues; silent continues without logging; propagate returns the error and can cause the component to drop the payload. Transform and filter default to ignore; the transform default-error gate was removed in v0.162.0, so naming it in --feature-gates fails startup (history: the otel-collector skill's transform quirks), and the filter gate is stable and cannot be disabled. Routing also defaults to ignore while its beta default-error feature gate is enabled. For routing, ignore sends an errored payload to default_pipelines; configure that fallback or the payload is dropped.
  5. Verify end to end. Validate the exact Collector version, then send known telemetry and inspect file-exporter output. Use the telemetrygen recipe.
ottl
set(span.attributes["env"], "prod") where resource.attributes["env"] == nil

Load only what the task needs

  • Contexts — exact paths, hierarchy, enums, and request metadata.
  • Functions — editor/converter signatures and release availability.
  • Quick reference — component YAML, recipes, escaping, troubleshooting, and safe skeletons.

For a single path or function, read only the relevant section instead of loading the full catalogs.

Safety and correctness gates

  • Guard optional or polymorphic input before conversion: where x != nil, IsString(x), or the appropriate type check.
  • For JSON-object-only work, guard both the type and shape before calling ParseJSON, for example IsString(log.body) and IsMatch(log.body.string, "(?s)^\\s*\\{.*\\}\\s*$"). The RE2 (?s) flag admits pretty-printed objects containing newlines. Checking IsMap after parsing does not prevent arrays or scalar JSON from being parsed.
  • On a version-pinned request, confirm every chosen path and function against that release tag; do not assume a function listed for this skill's v0.162 anchor exists in an older release. For v0.156 JSON-object parsing, ParseJSON, IsString, and IsMatch are available without the v0.157 alpha lambda feature gate.
  • Request metadata is read-only and may contain credentials. Copy only explicitly allowlisted, non-sensitive keys. OTLP metadata routing requires include_metadata: true on the receiver. HTTP/client header spelling may retain its form (otelcol.client.metadata["X-Tenant"][0]); gRPC metadata keys are lowercase (otelcol.grpc.metadata["x-tenant"][0]).
  • The routing request context is deprecated as of v0.156; use otelcol.client.metadata or otelcol.grpc.metadata.
  • Log-record-specific rewrites of shared resource or scope data require flatten_data: true and the alpha transform.flatten.logs gate. This copies and regroups data; do not enable it accidentally.
  • Since v0.161, set(target, nil) is no longer a no-op: the ottl.set.allowNil gate became beta in v0.161 and stable (cannot be disabled) in v0.162. A nil value empties a map, slice, or pcommon.Value target (an attribute key is created with an empty value) and errors on scalar targets. Use a where source != nil guard when the destination must remain unchanged for missing input.
  • Hashing an identifier does not necessarily anonymize it. Apply the organization's data-handling policy before retaining deterministic hashes of personal data.
Show full SKILL.md (140 more words)Show less

Frequent syntax traps

  • In Collector YAML, write an OTTL replacement backreference ${1} as $${1}. A replacement such as $1REDACTED is literal and silently fails to substitute the capture.
  • Go RE2 rejects large counted repetitions such as (.{1024}).*; use Substring with a nil/type guard and Len, or truncate_all for a map.
  • Current span-event paths use spanevent.*, not span_event.*. Cache paths are context-qualified, such as span.cache["parsed"].
  • Quote any OTTL statement containing a map literal when YAML includes a space after :, for example 'set(log.attributes["a"], {"foo": "bar"})'; otherwise YAML parses : as a mapping.
  • Since v0.159, polymorphic pcommon.Value paths compare by their underlying type; maps and slices support only equality and inequality, while primitive values also support ordering.
  • Use Decode(value, "base64"); Base64Decode was removed in v0.161.
  • Regex escapes inside OTTL strings are doubled (\\d, \\s, \\.).

Upstream sources

© ollygarden, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/otel-ottl of ollygarden/opentelemetry-agent-skills.

  • SKILL.md
  • evals/evals.json
  • references/contexts.md
  • references/functions.md
  • references/quick-reference.md

Open the folder on GitHubat commit 9900032

Compare with similar skills

Otel Ottl next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Otel Ottl compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Otel Ottl this skillollygarden/opentelemetry-agent-skills106—~1.7kAutomated safety check: PassApache-2.0
Motel Debugkitlangton/motel298—~2.2kAutomated safety check: PassMIT
Tempsgotempsh/temps833—~2kAutomated safety check: PassApache-2.0
Axiom Metrics Queryopenclaw/clawhub9.5k—~2.6kAutomated safety check: PassMIT
UModel Root Cause Analysisalibaba/UnifiedModel415—~1.9kAutomated safety check: PassCustom licence
Agent Kill Switchvivekchand/clawmetry426—~1.1kAutomated safety check: PassMIT

Similar skills

  • Motel Debug

    kitlangton/motel

    Debug applications with motel, a local OpenTelemetry ingest and query server.

    298 GitHub stars~2.2k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Temps

    gotempsh/temps

    Manage, deploy, operate, and instrument applications with Temps.

    833 GitHub stars~2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Axiom Metrics Query

    openclaw/clawhub

    Explores and queries OpenTelemetry metrics in Axiom MetricsDB, listing datasets, metrics and tags first and picking the right aggregation for each metric's type.

    9.5k GitHub stars~2.6k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • UModel Root Cause Analysis

    alibaba/UnifiedModel

    Investigates a service incident to its root cause by querying a UModel object graph alongside metrics, logs, topology and recent deployments.

    415 GitHub stars~1.9k tokensUpdated 17 days ago
    DevOps & CloudAuto-check passed
  • Agent Kill Switch

    vivekchand/clawmetry

    Give the human an off switch and a cost meter for the coding agents on this machine, using ClawMetry.

    426 GitHub stars~1.1k tokensUpdated 3 days ago
    DevOps & CloudAuto-check passed
  • Agentmeasure

    roy-tong/AgentMeasure

    Check whether agent telemetry preserves measurement semantics.

    219 GitHub stars~753 tokensUpdated today
    DevOps & CloudAuto-check passed

More from ollygarden/opentelemetry-agent-skills

All 20 skills in this repo
  • Otel Collector Builder

    ollygarden/opentelemetry-agent-skills

    Build custom OpenTelemetry Collector distributions with OCB (OpenTelemetry Collector Builder).

    106 GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Otel Go

    ollygarden/opentelemetry-agent-skills

    OpenTelemetry in Go — SDK setup, API surface, breaking changes, contrib instrumentation libraries (otelhttp, otelgrpc, otelmongo), compile-time zero-code instrumentation (otelc), and performance…

    106 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Otel Profiles

    ollygarden/opentelemetry-agent-skills

    OpenTelemetry profiles signal and the eBPF profiler (otelcol-ebpf-profiler, profiling receiver).

    106 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Otel Span Events To Logs Migration

    ollygarden/opentelemetry-agent-skills

    Migrate OpenTelemetry Span Events (AddEvent, RecordException, and language equivalents) to the Logs API following the accepted OTEP 4430 migration plan.

    106 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Otel Telemetrygen

    ollygarden/opentelemetry-agent-skills

    Build safe, version-pinned telemetrygen commands for synthetic OTLP traces, metrics, and logs.

    106 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Otel Upgrade

    ollygarden/opentelemetry-agent-skills

    Assess OpenTelemetry package and Collector upgrades across ecosystems.

    106 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Otel Ottl

What does Otel Ottl do?

OpenTelemetry Transformation Language (OTTL) expert for writing and debugging telemetry transformations in the OpenTelemetry Collector. Otel Ottl is an agent skill from ollygarden/opentelemetry-agent-skills. OpenTelemetry Transformation Language (OTTL) expert for writing and debugging telemetry transformations in the OpenTelemetry Collector.

When should I use Otel Ottl?

Otel Ottl fits situations like: reviewing transform; tailsampling processor configs; routing connector configs; debugging OTTL syntax.

How do I install Otel Ottl in Claude Code?

Run `npx skills add ollygarden/opentelemetry-agent-skills --skill otel-ottl -a claude-code`. Or copy the skill folder (skills/otel-ottl in ollygarden/opentelemetry-agent-skills) into .claude/skills/otel-ottl in your project. Claude Code loads it when a task matches its description.

How do I install Otel Ottl in Codex?

Run `npx skills add ollygarden/opentelemetry-agent-skills --skill otel-ottl -a codex`. Or copy the skill folder (skills/otel-ottl in ollygarden/opentelemetry-agent-skills) into .agents/skills/otel-ottl in your project. Codex loads it when a task matches its description.

Can I use Otel Ottl in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ollygarden/opentelemetry-agent-skills --skill otel-ottl -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/otel-ottl, .gemini/skills/otel-ottl, .github/skills/otel-ottl and .opencode/skills/otel-ottl in your project.

What does Otel Ottl need to run?

SKILL.md names no scripts, command-line tools or credentials: Otel Ottl is instructions for the agent only.

Does Otel Ottl access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Otel Ottl safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Otel Ottl use?

Otel Ottl is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Otel Ottl use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 12k tokens, read only when the agent opens those files.

What are the alternatives to Otel Ottl?

Skills that share tags, products or a category with Otel Ottl: Motel Debug (kitlangton/motel, 298 stars), Temps (gotempsh/temps, 833 stars), Axiom Metrics Query (openclaw/clawhub, 9.5k stars) and UModel Root Cause Analysis (alibaba/UnifiedModel, 415 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Otel Ottl?

ollygarden (a GitHub organization) maintains it in ollygarden/opentelemetry-agent-skills, which has 106 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 11, 2026.

Source: ollygarden/opentelemetry-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.