Otel Instrumentation
Configures trace spans, defines custom metrics, sets up log exporters, and optimizes sampling strategies for OpenTelemetry instrumentation. Use when…
Install
Quick install
npx skills add https://github.com/dash0hq/agent-skills/tree/HEAD/skills/otel-instrumentationnpx skills add dash0hq/agent-skills --skill otel-instrumentation --agent claude-codenpx skills add dash0hq/agent-skills --skill otel-instrumentation --agent cursornpx skills add dash0hq/agent-skills --skill otel-instrumentation --agent codexnpx skills add dash0hq/agent-skills --skill otel-instrumentation --agent opencodenpx skills add dash0hq/agent-skills --skill otel-instrumentation --agent github-copilotnpx skills add dash0hq/agent-skills --skill otel-instrumentation --agent windsurfMore install options
Shorthand — useful for multi-skill repos:
npx skills add dash0hq/agent-skills --skill otel-instrumentationManual — clone the repo and drop the folder into your agent's skills directory:
git clone https://github.com/dash0hq/agent-skills.gitcp -r agent-skills/skills/otel-instrumentation ~/.claude/skills/otel-instrumentation
Configures trace spans, defines custom metrics, sets up log exporters, and optimizes sampling strategies for OpenTelemetry instrumentation. Use when…
otel-instrumentationby dash0hq
Configures trace spans, defines custom metrics, sets up log exporters, and optimizes sampling strategies for OpenTelemetry instrumentation. Use when…npx skills add https://github.com/dash0hq/agent-skills --skill otel-instrumentationDownload ZIPGitHub
OpenTelemetry Instrumentation Guide
Expert guidance for implementing high-quality, cost-efficient OpenTelemetry telemetry.
Rules & Quick Reference
Use Case / RuleDescriptiontelemetryEntrypoint — signal types, correlation, and navigationresolve-valuesResolving configuration values from the codebaseresourcesResource attributes — service identity and environmentk8sKubernetes deployment — downward API, pod specspansSpans — naming, kind, status, and hygienelogsLogs — structured logging, severity, trace correlationmetricsMetrics — instrument types, naming, units, cardinalitysensitive-dataSensitive data — PII prevention, sanitization, redactioncapture-database-query-parametersPrepared-statement parameter capture per language (Java, .NET, Python, Node.js, Go)validationTelemetry validation — post-deployment verification checklistnodejsNode.js instrumentation setupgoGo instrumentation setuppythonPython instrumentation setupjavaJava instrumentation setupscalaScala instrumentation setupdotnet.NET instrumentation setuprubyRuby instrumentation setupphpPHP instrumentation setupbrowserBrowser instrumentation setupnextjsNext.js full-stack instrumentation (App Router)
Official documentation
- OpenTelemetry Documentation
- Semantic Conventions
- Dash0 Integration Hub
Getting started
Follow these steps when instrumenting an application from scratch:
- Pick your SDK rule — choose the language-specific rule from the table above (e.g., nodejs, python).
- Set up resource attributes — define service identity and environment per resources.
- Add spans, metrics, and logs — instrument your code following spans, metrics, and logs.
- Guard sensitive data — scrub PII before export per sensitive-data.
- Validate — confirm telemetry reaches the backend using the checklist in validation.
The snippet below shows a complete span with attributes and status for Node.js — see nodejs for full setup including SDK initialisation, exporter configuration, and auto-instrumentation:
`const { trace, SpanStatusCode } = require('@opentelemetry/api');
const tracer = trace.getTracer('my-service', '1.0.0');
tracer.startActiveSpan('operation-name', async (span) => {
try {
span.setAttribute('user.id', userId);
span.setAttribute('order.id', orderId);
const result = await processOrder(orderId);
span.setAttribute('order.status', result.status);
span.setStatus({ code: SpanStatusCode.OK });
return result;
} catch (err) {
span.setStatus({ code: SpanStatusCode.ERROR, message: err.message });
span.recordException(err);
throw err;
} finally {
span.end();
}
});
`
Key principles
Signal density over volume
Every telemetry item should serve one of three purposes:
- Detect - Help identify that something is wrong
- Localize - Help pinpoint where the problem is
- Explain - Help understand why it happened
If it doesn't serve one of these purposes, don't emit it.
Sample in the pipeline, not the SDK
Use the AlwaysOn sampler (the default) in every SDK.
Do not configure SDK-side samplers — they make irreversible decisions before the outcome of a request is known.
Defer all sampling to the Collector, where policies can be changed centrally without redeploying applications.
`SDK (AlwaysOn) → Collector (sampling) → Backend (retention)
↓ ↓ ↓
All spans Head or tail Storage policies
exported sampling applied
`
More skills from dash0hq
otel-collectorby dash0hqExpert guidance for configuring and deploying the OpenTelemetry Collector. Use when setting up a Collector pipeline, configuring receivers, exporters, or…otel-ottlby dash0hqOpenTelemetry Transformation Language (OTTL) expert. Use when writing or debugging OTTL expressions for any OpenTelemetry Collector component that supports…otel-semantic-conventionsby dash0hqOpenTelemetry Semantic Conventions expert. Use when selecting, applying, or reviewing telemetry attributes. Triggers on tasks involving attribute selection,…---
Source: https://github.com/dash0hq/agent-skills/tree/HEAD/skills/otel-instrumentation
Author: dash0hq
Discovered via: mcpservers.org
SKILL.md source
---
name: otel-instrumentation
description: Configures trace spans, defines custom metrics, sets up log exporters, and optimizes sampling strategies for OpenTelemetry instrumentation. Use when…
---
# otel-instrumentation
Configures trace spans, defines custom metrics, sets up log exporters, and optimizes sampling strategies for OpenTelemetry instrumentation. Use when…
# otel-instrumentationby dash0hq
Configures trace spans, defines custom metrics, sets up log exporters, and optimizes sampling strategies for OpenTelemetry instrumentation. Use when…
`npx skills add https://github.com/dash0hq/agent-skills --skill otel-instrumentation`Download ZIPGitHub
## OpenTelemetry Instrumentation Guide
Expert guidance for implementing high-quality, cost-efficient OpenTelemetry telemetry.
## Rules & Quick Reference
Use Case / RuleDescriptiontelemetryEntrypoint — signal types, correlation, and navigationresolve-valuesResolving configuration values from the codebaseresourcesResource attributes — service identity and environmentk8sKubernetes deployment — downward API, pod specspansSpans — naming, kind, status, and hygienelogsLogs — structured logging, severity, trace correlationmetricsMetrics — instrument types, naming, units, cardinalitysensitive-dataSensitive data — PII prevention, sanitization, redactioncapture-database-query-parametersPrepared-statement parameter capture per language (Java, .NET, Python, Node.js, Go)validationTelemetry validation — post-deployment verification checklistnodejsNode.js instrumentation setupgoGo instrumentation setuppythonPython instrumentation setupjavaJava instrumentation setupscalaScala instrumentation setupdotnet.NET instrumentation setuprubyRuby instrumentation setupphpPHP instrumentation setupbrowserBrowser instrumentation setupnextjsNext.js full-stack instrumentation (App Router)
## Official documentation
* OpenTelemetry Documentation
* Semantic Conventions
* Dash0 Integration Hub
## Getting started
Follow these steps when instrumenting an application from scratch:
* Pick your SDK rule — choose the language-specific rule from the table above (e.g., nodejs, python).
* Set up resource attributes — define service identity and environment per resources.
* Add spans, metrics, and logs — instrument your code following spans, metrics, and logs.
* Guard sensitive data — scrub PII before export per sensitive-data.
* Validate — confirm telemetry reaches the backend using the checklist in validation.
The snippet below shows a complete span with attributes and status for Node.js — see nodejs for full setup including SDK initialisation, exporter configuration, and auto-instrumentation:
```
`const { trace, SpanStatusCode } = require('@opentelemetry/api');
const tracer = trace.getTracer('my-service', '1.0.0');
tracer.startActiveSpan('operation-name', async (span) => {
try {
span.setAttribute('user.id', userId);
span.setAttribute('order.id', orderId);
const result = await processOrder(orderId);
span.setAttribute('order.status', result.status);
span.setStatus({ code: SpanStatusCode.OK });
return result;
} catch (err) {
span.setStatus({ code: SpanStatusCode.ERROR, message: err.message });
span.recordException(err);
throw err;
} finally {
span.end();
}
});
`
```
## Key principles
### Signal density over volume
Every telemetry item should serve one of three purposes:
* Detect - Help identify that something is wrong
* Localize - Help pinpoint where the problem is
* Explain - Help understand why it happened
If it doesn't serve one of these purposes, don't emit it.
### Sample in the pipeline, not the SDK
Use the `AlwaysOn` sampler (the default) in every SDK.
Do not configure SDK-side samplers — they make irreversible decisions before the outcome of a request is known.
Defer all sampling to the Collector, where policies can be changed centrally without redeploying applications.
```
`SDK (AlwaysOn) → Collector (sampling) → Backend (retention)
↓ ↓ ↓
All spans Head or tail Storage policies
exported sampling applied
`
```
## More skills from dash0hq
otel-collectorby dash0hqExpert guidance for configuring and deploying the OpenTelemetry Collector. Use when setting up a Collector pipeline, configuring receivers, exporters, or…otel-ottlby dash0hqOpenTelemetry Transformation Language (OTTL) expert. Use when writing or debugging OTTL expressions for any OpenTelemetry Collector component that supports…otel-semantic-conventionsby dash0hqOpenTelemetry Semantic Conventions expert. Use when selecting, applying, or reviewing telemetry attributes. Triggers on tasks involving attribute selection,…
---
**Source**: https://github.com/dash0hq/agent-skills/tree/HEAD/skills/otel-instrumentation
**Author**: dash0hq
**Discovered via**: mcpservers.org
Related skills 6
caveman
Ultra-compressed communication mode. Cuts token usage ~75% by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
secure-linux-web-hosting
Use when setting up, hardening, or reviewing a cloud server for self-hosting, including DNS, SSH, firewalls, Nginx, static-site hosting, reverse-proxying an app, HTTPS with Let's Encrypt or ACME clients, safe HTTP-to-HTTPS redirects, or optional post-launch network tuning such as BBR.
readme-i18n
Use when the user wants to translate a repository README, make a repo multilingual, localize docs, add a language switcher, internationalize the README, or update localized README variants in a GitHub-style repository.
lark-shared
Use when first setting up lark-cli, running auth login, switching user/bot identity (--as), handling permission denied or scope errors, needing to update lark-cli, or seeing _notice in JSON output.
improve-codebase-architecture
Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.
paper-context-resolver
Optional RigorPilot helper for README-first deep learning repo reproduction. Use only when the README and repository files leave a narrow reproduction-critical gap and the task is to resolve a specific paper detail such as dataset split, preprocessing, evaluation protocol, checkpoint mapping, or runtime assumption from primary paper sources while recording conflicts. Do not use for general paper summary, repo scanning, environment setup, command execution, title-only paper lookup, or replacin...