/dash0-agent-skills:otel-instrumentationfrom dash0-agent-skills
Configures OpenTelemetry traces, metrics, and logs with best practices for sampling, resource attributes, and multi-language SDK setup (Node.js, Go, Python, Java, .NET, Ruby, PHP, Rust, Scala, browser).
Ships in dash0-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Expert guidance for implementing high-quality, cost-efficient OpenTelemetry telemetry.
| Use Case / Rule | Description |
|---|---|
| telemetry | Entrypoint — signal types, correlation, and navigation |
| resolve-values | Resolving configuration values from the codebase |
| verify-dependencies | Verifying instrumentation packages and versions exist before adding them |
| resources | Resource attributes — service identity and environment |
| k8s | Kubernetes deployment — downward API, pod spec |
| aws-lambda | AWS Lambda deployment — decision process, manual SDK for Go, .NET, and Rust, resource attributes, validation |
| aws-lambda-otel-layers | Path A — upstream OTel layers, wrapper paths, per-runtime instrumentation tuning |
| aws-lambda-dash0-layers | Path B — Dash0 Lambda Extension, DASH0_* variables, collection modes |
| spans | Spans — naming, kind, status, and hygiene |
| logs | Logs — structured logging, severity, trace correlation |
| metrics | Metrics — instrument types, naming, units, cardinality |
| sensitive-data | Sensitive data — PII prevention, sanitization, redaction |
| capture-database-query-parameters | Prepared-statement parameter capture per language (Java, .NET, Python, Node.js, Go) |
| validation | Telemetry validation — post-deployment verification checklist |
| nodejs | Node.js instrumentation setup |
| go | Go instrumentation setup |
| python | Python instrumentation setup |
| java | Java instrumentation setup |
| scala | Scala instrumentation setup |
| dotnet | .NET instrumentation setup |
| ruby | Ruby instrumentation setup |
| php | PHP instrumentation setup |
| rust | Rust instrumentation setup |
| browser | Browser instrumentation setup |
| nextjs | Next.js full-stack instrumentation (App Router) |
Follow these steps when instrumenting an application from scratch:
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:
import { trace, SpanStatusCode } from '@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) {
// Record the exception as a structured log record, not span.recordException — see rules/spans.md
span.setStatus({ code: SpanStatusCode.ERROR, message: `${err.name}: ${err.message}` });
const spanContext = span.spanContext();
logger.error('operation-name.failed', {
'trace_id': spanContext.traceId,
'span_id': spanContext.spanId,
'exception.type': err.name,
'exception.message': err.message,
'exception.stacktrace': err.stack,
});
throw err;
} finally {
span.end();
}
});
Every telemetry item should serve one of three purposes:
If it doesn't serve one of these purposes, don't emit it.
Set the AlwaysOn sampler explicitly in every SDK (OTEL_TRACES_SAMPLER=always_on).
This overrides the OpenTelemetry default, ParentBased(root=AlwaysOn), under which callers outside the trust boundary can silently switch off a service's tracing through the traceparent header.
Do not configure ratio-based SDK samplers either — 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.
See SDK sampling for the full rationale and the conditions under which ParentBased is acceptable.
SDK (AlwaysOn, set explicitly) → Collector (sampling) → Backend (retention)
↓ ↓ ↓
All spans Head or tail Storage policies
exported sampling applied
README.md (opens in a new tab)rules/capture-database-query-parameters.md (opens in a new tab)rules/logs.md (opens in a new tab)rules/metrics.md (opens in a new tab)rules/platforms/aws-lambda-dash0-layers.md (opens in a new tab)rules/platforms/aws-lambda-otel-layers.md (opens in a new tab)rules/platforms/aws-lambda.md (opens in a new tab)rules/platforms/k8s.md (opens in a new tab)rules/resolve-values.md (opens in a new tab)rules/resources.md (opens in a new tab)rules/sdks/browser.md (opens in a new tab)rules/sdks/dotnet.md (opens in a new tab)rules/sdks/go.md (opens in a new tab)rules/sdks/java.md (opens in a new tab)rules/sdks/nextjs.md (opens in a new tab)rules/sdks/nodejs.md (opens in a new tab)rules/sdks/php.md (opens in a new tab)rules/sdks/python.md (opens in a new tab)rules/sdks/ruby.md (opens in a new tab)rules/sdks/rust.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/otel-collectorExpert guidance for configuring and deploying the OpenTelemetry Collector. Use when setting up a Collector pipeline, configuring receivers, exporters, or processors, deploying a Collector to Kubernetes or Docker, or forwarding telemetry to Dash0. Triggers on requests involving collector, pipeline, OTLP receiver, exporter, or Dash0 collector setup./otel-ottlOpenTelemetry 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./otel-dash0-agent-skills@dash0 is listed by dash0hq/claude-marketplace — review the source before installing
npx claudepluginhub dash0hq/claude-marketplace --plugin dash0-agent-skillsOther plugins' skills for the same job