opentelemetry-js

Bootstraps OpenTelemetry instrumentation for Node.js services to enable traces, metrics, and logs.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kittne/codex-skills-by-codex --skill opentelemetry-js-kittne
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opentelemetry-js
Source: https://github.com/kittne/codex-skills-by-codex/tree/main/opentelemetry-js
Command: npx skills add https://github.com/kittne/codex-skills-by-codex --skill opentelemetry-js-kittne

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Establish observability in Node.js services by bootstrapping and configuring OpenTelemetry for traces, metrics, and logs, enabling consistent instrumentation across deployments.

Core Features & Use Cases

  • Automatic and manual instrumentation of Node.js applications to gather traces, metrics, and logs.
  • Stable resource identity and propagation, with configurable exporters and lifecycle management.
  • Real-world scenarios include microservices telemetry, serverless observability, and production-grade monitoring.

Quick Start

Boot the OpenTelemetry NodeSDK early in your app startup and configure the resource attributes and OTLP exporter.

Frequently Asked Questions about opentelemetry-js

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

FAQPage Schema
How do I instrument a Node.js app for traces and metrics?

To instrument a Node.js app for traces and metrics, bootstrap OpenTelemetry early in your startup sequence using the NodeSDK, configure resource attributes, and set up the OTLP exporter to enable end-to-end observability across your deployments.

What is OpenTelemetry instrumentation used for in Node.js microservices?

OpenTelemetry instrumentation in Node.js microservices is used to establish consistent observability by automatically and manually gathering traces, metrics, and logs, enabling production-grade monitoring across distributed workloads.

Can I use OpenTelemetry to add observability to serverless Node.js workloads?

Yes, you can use OpenTelemetry to add observability to serverless Node.js workloads by configuring the NodeSDK initialization order and OTLP exporters to capture traces, metrics, and logs in serverless environments.

What's the best way to configure OTLP exporters and resource attributes in Node.js?

The best way to configure OTLP exporters and resource attributes in Node.js is during the initial NodeSDK bootstrap phase, ensuring proper initialization order to maintain stable resource identity and propagation.

Why does OpenTelemetry initialization order matter in Node.js applications?

OpenTelemetry initialization order matters in Node.js applications because the NodeSDK must boot early in the app startup to properly intercept and instrument traces, metrics, and logs before application code executes.

Do I need graceful shutdown handling for OpenTelemetry instrumentation in production Node.js?

Yes, you need graceful shutdown handling for OpenTelemetry instrumentation in production Node.js to ensure that all buffered traces, metrics, and logs are properly flushed via the OTLP exporter before the application terminates.