From dash0-agent-skills
Guides OpenTelemetry instrumentation setup across multiple languages (Node.js, Go, Python, Java, .NET, Ruby, PHP, browser, Next.js). Covers spans, metrics, logs, resource attributes, sampling, and sensitive data handling.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dash0-agent-skills:otel-instrumentationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Expert guidance for implementing high-quality, cost-efficient OpenTelemetry telemetry.
README.mdrules/capture-database-query-parameters.mdrules/logs.mdrules/metrics.mdrules/platforms/k8s.mdrules/resolve-values.mdrules/resources.mdrules/sdks/browser.mdrules/sdks/dotnet.mdrules/sdks/go.mdrules/sdks/java.mdrules/sdks/nextjs.mdrules/sdks/nodejs.mdrules/sdks/php.mdrules/sdks/python.mdrules/sdks/ruby.mdrules/sdks/scala.mdrules/sensitive-data.mdrules/spans.mdrules/telemetry.mdExpert 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 |
| resources | Resource attributes — service identity and environment |
| k8s | Kubernetes deployment — downward API, pod spec |
| 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 |
| 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:
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();
}
});
Every telemetry item should serve one of three purposes:
If it doesn't serve one of these purposes, don't emit it.
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
npx claudepluginhub dash0hq/claude-marketplace --plugin dash0-agent-skillsGuides OpenTelemetry SDK setup, custom instrumentation (spans, attributes, events, links), sampling, OTel Collector config, and OTLP export to Honeycomb for Go, Python, Node.js, Java, Ruby, .NET, Rust.
OpenTelemetry tracing discipline: correct spans, propagation, and semantic conventions produce useful traces. Invoke whenever task involves any interaction with distributed tracing — span creation, context propagation, instrumentation, sampling configuration, or OpenTelemetry SDK setup.
Provides OpenTelemetry conventions for span naming, semantic attributes, status setting, in-memory trace testing, and instrumentation boundaries. Use when setting up tracing or writing trace tests.