otel_ottl

Document OTTL syntax, contexts, operators, and error handling for collectors.

20|6|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/adrielp/ai-engineering-harness --skill otel-ottl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: otel_ottl
Source: https://github.com/adrielp/ai-engineering-harness/tree/main/gemini/skills/otel_ottl
Command: npx skills add https://github.com/adrielp/ai-engineering-harness --skill otel-ottl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenTelemetry (OTEL) users need a clear, reference-driven guide to OpenTelemetry Transformation Language (OTTL) for building robust, production-grade expressions across collectors, processors, and signals.

Core Features & Use Cases

  • Comprehensive syntax guide covering contexts, operators, and enumerations for span, resource, scope, log, and metric data.
  • Practical patterns for redaction, normalization, enrichment, filtering, and error handling with safe defaults (error_mode: ignore).
  • Use Case: Build a transform pipeline that masks sensitive fields in traces while enriching span attributes for routing and alerting.

Quick Start

Provide a minimal, production-grade OTTL example that redacts sensitive attributes in a span using transform rules.

Frequently Asked Questions about otel_ottl

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

FAQPage Schema
How do I write OTTL expressions to redact sensitive attributes in OpenTelemetry traces?

Using OTTL, you construct transform rules within the OpenTelemetry Collector that target span attributes and update or delete matching fields. This Skill provides production-grade patterns for masking sensitive data while maintaining pipeline integrity with safe defaults.

What is the OpenTelemetry Transformation Language used for?

The OpenTelemetry Transformation Language (OTTL) is used within collectors for shaping telemetry data across traces, metrics, and logs. It enables the normalization, enrichment, filtering, and redaction of observability data before downstream export.

How do I handle errors during OpenTelemetry data normalization and processing?

Handle errors during OpenTelemetry data normalization by setting error_mode to ignore within your OTTL configurations. This ensures transform pipelines continue functioning when encountering unexpected data types or missing attributes during processing.

Can I use OTTL to enrich log and metric attributes for routing scenarios?

Yes, OTTL supports enriching log, metric, and span attributes to facilitate dynamic routing and alerting. The language applies contexts across resource, scope, and signal-specific data to append necessary metadata for downstream processors.

What are the limitations of using OTTL for telemetry data redaction at scale?

When using OTTL for redaction at scale, limitations include potential processing overhead from complex expressions and the risk of dropping valid telemetry if error handling is misconfigured. Careful construction of contexts and operators is required to avoid pipeline bottlenecks.