otel-ottl

Author OTTL expressions to transform or filter OpenTelemetry telemetry in Collector pipelines.

2|Updated May 28, 2026
One-click install
npx skills add https://github.com/tsuga-dev/agent-plugins --skill otel-ottl-tsuga-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: otel-ottl
Source: https://github.com/tsuga-dev/agent-plugins/tree/main/plugins/telemetry/skills/otel-ottl
Command: npx skills add https://github.com/tsuga-dev/agent-plugins --skill otel-ottl-tsuga-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the problem of safely and consistently transforming OpenTelemetry data (traces, metrics, and logs) in the Collector without needing application code changes.

Core Features & Use Cases

  • OTTL authoring for Collector transforms and filters: Write expressions for transform, filter, routing, tailsamplingprocessor policies, and related components.
  • Privacy-safe telemetry shaping: Redact or hash sensitive fields, drop spans/logs/metrics conditionally, and prevent optional-field errors using where + nil checks.
  • Enrichment and normalization: Add derived attributes, rename fields via transform patterns, and control cardinality by deleting high-cardinality attributes.

Quick Start

Ask an AI: "Write OTTL statements to redact the authorization and cookie headers in trace requests while avoiding nil attribute errors in the transform processor."

Frequently Asked Questions about otel-ottl

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I redact sensitive headers in OpenTelemetry traces without causing errors?

Redact sensitive headers in OpenTelemetry traces by authoring OTTL statements inside the transform processor. Use `where` clauses with `nil` checks to safely drop or hash authorization and cookie attributes, preventing optional-field errors during telemetry transformation.

What is the best way to conditionally drop spans or logs in an OpenTelemetry Collector?

Conditionally drop spans or logs in an OpenTelemetry Collector by writing OTTL filter expressions. Apply correct OTTL contexts and operators to evaluate telemetry data and selectively remove unwanted records across traces, metrics, and logs.

How does OTTL work for routing OpenTelemetry telemetry data?

OTTL works for routing OpenTelemetry telemetry by applying expressions to route data based on attributes within the Collector pipeline. It uses Collector-compatible connector structures to direct traces, metrics, and logs to appropriate destinations conditionally.

Can I use OTTL to control metric cardinality in OpenTelemetry pipelines?

Control metric cardinality in OpenTelemetry pipelines by using OTTL to delete high-cardinality attributes. Author transform expressions that target and remove specific telemetry attributes, normalizing metrics data before it reaches downstream storage.

How do I avoid nil attribute errors when writing OpenTelemetry transform expressions?

Avoid nil attribute errors in OpenTelemetry transform expressions by leveraging `where` clauses with `nil` checks. This OTTL pattern ensures optional fields are validated before redaction, enrichment, or conditional dropping operations execute.

Does the OpenTelemetry Collector support telemetry transformation for logs and metrics?

The OpenTelemetry Collector supports telemetry transformation for logs and metrics via OTTL. Apply expressions across traces, metrics, and logs to perform enrichment, normalization, and privacy-safe redaction within the pipeline.