otel-migration

Retrofit OpenTelemetry tracing, logging, and metrics into existing uninstrumented applications.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/krzko/pokemon-api --skill otel-migration-krzko
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: otel-migration
Source: https://github.com/krzko/pokemon-api/tree/main/.claude/skills/otel-migration
Command: npx skills add https://github.com/krzko/pokemon-api --skill otel-migration-krzko

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adding OpenTelemetry to an existing codebase is error-prone: context propagation silently breaks, framework middleware exposes the wrong context object, and existing Prometheus metrics or logging setups conflict with new telemetry. This Skill provides a phased, verifiable migration plan that avoids disconnected traces and broken monitoring. ## Core Features & Use Cases - Six-Phase Migration Plan: Sequences SDK initialization, HTTP middleware, context propagation refactoring, custom spans, logging bridges, and metrics bridges, with each phase independently deployable and verifiable. - Language-Specific Guidance: Covers context propagation patterns for Go, Python, Java, Node.js, .NET, and Ruby, including thread pool, goroutine, and async pain points. - Bridge Libraries: Documents how to bridge slog, zap, logrus, winston, pino, Log4j, Logback, and Prometheus into OTel without rewriting existing instrumentation. - Use Case: You have a Go service using Fiber v2 and Prometheus with no tracing. Follow the migration phases to add OTel middleware, thread context through handlers, bridge Prometheus metrics, and verify connected traces with the included checklist. ## Quick Start Ask the AI to create an OpenTelemetry migration plan for your existing application, specifying your language, framework, and current logging or metrics setup.

Frequently Asked Questions about otel-migration

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

FAQPage Schema
How do I add OpenTelemetry to an existing application?▼

Follow a phased migration: initialize the OTel SDK with OTLP exporters, add HTTP framework middleware for automatic request spans, thread trace context through your call chain, add custom spans at I/O boundaries, then bridge existing logging and metrics. Verify connected traces after each phase.

How do I migrate Prometheus metrics to OpenTelemetry?▼

Use a Prometheus bridge library that reads from your existing registry and exports metrics via OTLP, leaving existing counter and gauge calls unchanged. Keep the /metrics endpoint for current scrapers, or use the OTel Collector's Prometheus receiver to scrape and convert metrics without code changes.

Why are my OpenTelemetry traces disconnected or showing orphaned spans?▼

Disconnected traces mean context propagation is breaking somewhere in the call chain. Common causes include using the wrong framework context accessor (Fiber's c.Context() instead of c.UserContext()), losing thread-local context in thread pools, or not passing context.Context through Go function calls.

Does OpenTelemetry work with Fiber v2 in Go?▼

Yes, via the otelfiber middleware, but you must use c.UserContext() to access the OTel-enriched context. Using c.Context() returns the fasthttp context without the span, which compiles and runs but silently breaks trace connectivity.

Can I keep my existing logging library when migrating to OpenTelemetry?▼

Yes, logging bridges exist for slog, zap, logrus, winston, pino, Log4j, Logback, and .NET ILogger. Use a multi-handler pattern to send logs to both stderr and OTel, and convert printf-style format strings to structured key-value pairs first.

When should I not use this migration approach?▼

This phased retrofit is for existing uninstrumented codebases. For greenfield projects, use a direct OTel instrumentation guide instead, and for Honeycomb Beeline-to-OTel transitions, use a Beeline-specific migration path.