otel-ottl

Solid

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.

Code & Development 85 stars 11 forks Updated 1 weeks ago Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
64
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 statement...

Details

Author
dash0hq
Repository
dash0hq/agent-skills
Created
5 months ago
Last Updated
1 weeks ago
Language
Go
License
Apache-2.0

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category