go-otel-instrumentation

Implement OpenTelemetry tracing, metrics, and logging in Go services.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/PremModhaOfficial/sdk-pipeline --skill go-otel-instrumentation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-otel-instrumentation
Source: https://github.com/PremModhaOfficial/sdk-pipeline/tree/main/skills/go-otel-instrumentation
Command: npx skills add https://github.com/PremModhaOfficial/sdk-pipeline --skill go-otel-instrumentation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires otel, go.opentelemetry.io/otel, nats.go, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies integrating OpenTelemetry tooling into Go services to enable comprehensive tracing, metrics, and logging.

Core Features & Use Cases

  • Tracer and Metric Setup: Automates creation of TracerProvider and MeterProvider with default or custom configurations.
  • Resource Construction: Provides patterns for building resource attributes for service identification and environment specification.
  • Trace Propagation: Implements injecting and extracting trace context via NATS headers.
  • Structured Logging: Enhances logs with trace and span identifiers for better observability.
  • Use Case: Used during SDK design, implementation, and code review to ensure full observability coverage in Go microservices.

Quick Start

Implement OpenTelemetry setup code for your Go service to establish tracing, metrics, and logging, integrating trace propagation across NATS messaging.

Frequently Asked Questions about go-otel-instrumentation

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

FAQPage Schema
How do I set up OpenTelemetry tracing and metrics in a Go microservice?

Set up OpenTelemetry in Go by configuring TracerProvider and MeterProvider instances with custom resource attributes. This Skill provides patterns to automate provider creation and establish comprehensive tracing and metrics for robust backend monitoring.

How do I propagate trace context through NATS messaging in Go?

Propagate trace context through NATS by injecting and extracting trace headers using the nats.go library. This Skill implements context propagation patterns across NATS messaging to maintain trace continuity in microservices architectures.

How do I correlate structured logs with trace IDs in Go OpenTelemetry?

Correlate structured logs with trace IDs by enhancing log entries with trace and span identifiers from OpenTelemetry. This Skill provides logging patterns that attach trace context to structured logs for better observability and debugging capabilities.

What resource attributes do I need for OpenTelemetry service identification in Go?

Resource attributes for OpenTelemetry service identification include service name and environment specification. This Skill provides patterns for building resource attributes to ensure proper service identification within your Go microservices architecture.

Can I use this OpenTelemetry setup for NATS messaging systems in Go?

Yes, this OpenTelemetry setup supports NATS messaging systems in Go through nats.go integration. It specifically implements trace context propagation via NATS headers, making it suitable for microservices architectures relying on NATS.

What is the best way to implement observability in Go microservices with OpenTelemetry?

The best way to implement observability in Go microservices is by integrating OpenTelemetry tracing, metrics, and structured logging. This Skill simplifies adding comprehensive observability patterns to ensure robust backend monitoring and debugging capabilities.