api-telemetry

Implement OpenTelemetry instrumentation to generate traces and metrics in JavaScript/TypeScript.

654|102|Updated Jan 23, 2025
One-click install
npx skills add https://github.com/cyanheads/obsidian-mcp-server --skill api-telemetry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-telemetry
Source: https://github.com/cyanheads/obsidian-mcp-server/tree/main/skills/api-telemetry
Command: npx skills add https://github.com/cyanheads/obsidian-mcp-server --skill api-telemetry

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @opentelemetry/api, @opentelemetry/sdk-node, @opentelemetry/instrumentation-pino, @cyanheads/mcp-ts-core/utils, and includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill enables detailed collection of telemetry data for diagnosing and monitoring applications.

Core Features & Use Cases

  • Instrumentation: Auto-instruments tools, resources, prompts, and system operations to generate traces and metrics.
  • Exporting: Configures export of logs, traces, and metrics to external observability platforms for analysis.
  • Use Case: Deploy this Skill to monitor a distributed system, track performance bottlenecks, and debug issues across microservices.

Quick Start

Enable OTEL export, import the telemetry utils, and wrap relevant code sections with withSpan or create custom metrics to start gathering data.

Frequently Asked Questions about api-telemetry

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

FAQPage Schema
How do I add OpenTelemetry instrumentation to monitor microservices?

To add OpenTelemetry instrumentation, import the telemetry utils and wrap relevant code sections with `withSpan` or create custom metrics. This enables auto-instrumentation of system operations to generate traces and metrics for complex systems.

Can I use this OpenTelemetry instrumentation with Cloudflare Workers and Bun?

Yes, this OpenTelemetry instrumentation supports runtime environments including Node.js, Bun, and Cloudflare Workers. It is designed to collect high-fidelity telemetry across these diverse platforms.

What is the best way to export metrics and traces for distributed system troubleshooting?

The best way to export telemetry data is to configure the export of logs, traces, and metrics to external observability platforms. This allows you to analyze the collected data to track performance bottlenecks and debug issues.

Does this telemetry collection require specific logging libraries?

It integrates with the Pino logging library through the `@opentelemetry/instrumentation-pino` dependency. This allows you to capture logs alongside traces and metrics for comprehensive application observability.

When do I need OpenTelemetry instrumentation for application performance monitoring?

You need OpenTelemetry instrumentation when diagnosing application issues, monitoring performance, and optimizing resource utilization. It is particularly useful for gaining observability into distributed microservices and serverless functions.