mikkelkrogsholm/dev-skills

opentelemetry

OpenTelemetry — vendor-neutral observability framework for generating and collecting traces, metrics, and logs.

First seen Mar 2, 2026

Installation

$ npx skills add mikkelkrogsholm/dev-skills --skill opentelemetry

Summary

  • OpenTelemetry — vendor-neutral observability framework for generating and collecting traces, metrics, and logs.
  • Use when building with OpenTelemetry or asking about its JavaScript/Node.js SDK setup, auto-instrumentation, manual spans, exporters, context propagation, sampling, or integration with Jaeger, Zipkin, or OTLP collectors.
  • Fetch live documentation for up-to-date details.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from mikkelkrogsholm/dev-skills · top by installs.

npx skills add mikkelkrogsholm/dev-skills

Browse all from mikkelkrogsholm/dev-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 6
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,154 B
  • docs SUMMARY.md 404 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 16 installs

SKILL.md

OpenTelemetry

CRITICAL: Your training data for OpenTelemetry is unreliable. APIs change between versions and memorized patterns may be wrong or deprecated. Before writing any code, you MUST use WebFetch to read the live docs:

WebFetch("https://opentelemetry.io/docs/languages/js/";)

Do not proceed without fetching this URL first. Never assume package names or initialization patterns — verify against current docs.

OpenTelemetry is a vendor-neutral observability framework for generating, collecting, and exporting traces, metrics, and logs.

Key Capabilities

OpenTelemetry JS bundles capabilities that developers often reach for separate tools to cover:

  • Auto-instrumentation: @opentelemetry/auto-instrumentations-node automatically instruments popular frameworks and libraries (Express, HTTP, gRPC, database clients) with zero code changes — no manual span creation needed for common libraries
  • Resource detection: built-in detectors for cloud providers, containers, and process info via OTELNODERESOURCE_DETECTORS — no need for custom resource-tagging middleware
  • Context propagation: W3C TraceContext and Baggage propagated automatically across async boundaries when using tracer.startActiveSpan — no manual context threading required

Best Practices

  • Instrumentation must load before application code — For ESM projects, use node --import ./instrumentation.mjs. For CommonJS projects or the zero-code package (@opentelemetry/auto-instrumentations-node), use node --require @opentelemetry/auto-instrumentations-node/register (or --require ./instrumentation.js). Loading instrumentation after app code silently produces no-op spans with no errors thrown.
  • Use BatchSpanProcessor in production, never SimpleSpanProcessor — the simple processor exports synchronously on every span end, adding latency to every request. BatchSpanProcessor is the correct choice for production; SimpleSpanProcessor is only appropriate for debugging.
  • SDK initialization failure is silent — if the SDK is initialized too late or fails to initialize, OpenTelemetry returns no-op implementations and emits no errors. Always verify spans appear in your exporter before deploying.
  • Always call span.end() — spans that are never ended are never exported. Wrap span bodies in try/finally to guarantee span.end() is called even on exceptions.
  • Lower the default sample rate for production — the getting-started default captures 100% of traces. Set OTELTRACESSAMPLER=parentbasedtraceidratio and OTELTRACESSAMPLERARG=0.1 (or equivalent SDK config) before going to production to avoid excessive collector and backend costs.