azure-monitor-opentelemetry-ts

Instrument Node.js apps with Azure Monitor OpenTelemetry for traces, metrics, and logs.

2.9k|323|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/microsoft/skills --skill azure-monitor-opentelemetry-ts-microsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-monitor-opentelemetry-ts
Source: https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-typescript/skills/azure-monitor-opentelemetry-ts
Command: npx skills add https://github.com/microsoft/skills --skill azure-monitor-opentelemetry-ts-microsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Instrument Node.js applications to automatically emit distributed traces, metrics, and logs to Azure Monitor using OpenTelemetry, reducing manual instrumentation effort and improving observability.

Core Features & Use Cases

  • Auto-instrument Node.js applications to emit traces, metrics, and logs with minimal configuration.
  • Configure instrumentation for common libraries (http, mongodb, mysql, redis, etc.) and add custom attributes for richer telemetry.
  • Support for ES Module projects via the loader and options for offline storage, custom exporters, and advanced configuration.
  • Use cases include end-to-end observability for APIs, background workers, and microservices running on Node.js with Azure Monitor integration.

Quick Start

Call useAzureMonitor() before importing other modules to enable auto-instrumentation.

Frequently Asked Questions about azure-monitor-opentelemetry-ts

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

FAQPage Schema
How do I auto-instrument a Node.js app with OpenTelemetry tracing and metrics?

To auto-instrument Node.js apps with OpenTelemetry tracing and metrics, call useAzureMonitor() before importing other modules. This initializes Azure Monitor integration to automatically emit distributed traces, metrics, and logs for server-side applications.

Does Azure Monitor OpenTelemetry support ES Modules in Node.js?

Yes, Azure Monitor OpenTelemetry supports ES Module projects in Node.js. It provides specific loader compatibility and configuration options to ensure proper auto-instrumentation and telemetry export within ES Module architectures.

Can I automatically collect traces for HTTP, MongoDB, and Redis libraries in Node.js?

You can automatically collect traces and metrics for common Node.js libraries including HTTP, MongoDB, MySQL, and Redis. The instrumentation integrates with these libraries automatically to capture distributed traces with minimal configuration.

What is the correct initialization order for OpenTelemetry in a Node.js application?

The correct initialization order requires calling useAzureMonitor() before importing other application modules. This ensures the OpenTelemetry instrumentation hooks attach properly to capture traces, metrics, and logs from the start.

Can I configure custom exporters and offline storage for Node.js OpenTelemetry traces?

Yes, you can configure custom exporters and offline storage options for Node.js OpenTelemetry traces. The instrumentation supports configurable exporters and resources, allowing you to manage custom traces, metrics, and logs for advanced observability scenarios.

Why are my custom Node.js traces not appearing in Azure Monitor?

Custom Node.js traces may not appear in Azure Monitor if useAzureMonitor() is not called before importing other modules. Ensuring correct initialization order and applying supported library configurations are required for proper telemetry export.