opentelemetry-instrumentation

Instrument Node.js and TypeScript applications with OpenTelemetry spans for distributed tracing.

12|6|Updated Jan 26, 2026
One-click install
npx skills add https://github.com/whitebeardit/.cursor --skill opentelemetry-instrumentation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opentelemetry-instrumentation
Source: https://github.com/whitebeardit/.cursor/tree/main/skills/nodejs/skill-opentelemetry-instrumentation
Command: npx skills add https://github.com/whitebeardit/.cursor --skill opentelemetry-instrumentation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @opentelemetry/api, @opentelemetry/sdk-trace-base, @opentelemetry/sdk-trace-node, @opentelemetry/instrumentation-http, @opentelemetry/instrumentation-express, @opentelemetry/exporter-otlp-http, @opentelemetry/auto-instrumentations-node, @opentelemetry/resources, @opentelemetry/semantic-conventions, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the process of adding distributed tracing and observability to Node.js/TypeScript applications, making it easier to monitor performance and debug issues.

Core Features & Use Cases

  • Automated Instrumentation: Easily integrate OpenTelemetry with minimal code changes using getNodeAutoInstrumentations.
  • Manual Instrumentation: Provides patterns for instrumenting HTTP servers (Express), HTTP client calls, database operations, and custom business logic.
  • Best Practices: Guides users on when to instrument, semantic conventions, and handling sensitive data.
  • Use Case: Instrument an Express.js API to automatically trace incoming requests, outgoing database queries, and external API calls, sending trace data to a backend like Jaeger or Grafana Tempo.

Quick Start

Use the opentelemetry-instrumentation skill to automatically instrument an Express.js application with OpenTelemetry.

Frequently Asked Questions about opentelemetry-instrumentation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add OpenTelemetry distributed tracing to a Node.js and TypeScript application?

You can add distributed tracing by using automatic instrumentation with `getNodeAutoInstrumentations` or by manually creating spans for HTTP servers, clients, and databases, adhering to OpenTelemetry semantic conventions.

What is the best way to instrument an Express.js API for observability?

The best way to instrument an Express.js API is using OpenTelemetry automatic instrumentation to trace incoming requests, outgoing database queries, and external API calls, sending trace data to backends like Jaeger or Grafana Tempo.

Can I automatically trace outgoing HTTP client requests and database queries in Node.js?

Yes, you can automatically trace outgoing HTTP client requests and database queries by integrating OpenTelemetry auto-instrumentations, which capture spans with minimal code changes required.

How do I manually create custom OpenTelemetry spans for business logic?

You manually create custom OpenTelemetry spans for business logic by using the OpenTelemetry API to define custom spans, applying semantic tagging and proper error handling to ensure accurate observability.

Does OpenTelemetry instrumentation support exporting traces to Jaeger or Grafana Tempo?

Yes, OpenTelemetry instrumentation supports exporting traces to backends like Jaeger or Grafana Tempo by utilizing the OTLP HTTP exporter to transmit span data from your Node.js application.

When should I use manual instrumentation instead of automatic tracing in Node.js?

Use manual instrumentation instead of automatic tracing when you need to capture custom business operations, apply specific semantic conventions, or handle sensitive data that automatic instrumentation cannot detect.