One-click install
npx skills add https://github.com/tsuga-dev/agent-plugins --skill otel-go-tsuga-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: otel-go
Source: https://github.com/tsuga-dev/agent-plugins/tree/main/plugins/telemetry/skills/otel-go
Command: npx skills add https://github.com/tsuga-dev/agent-plugins --skill otel-go-tsuga-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

Correct OpenTelemetry (OTel) setup and instrumentation for Go services is hard because distributed tracing requires precise SDK initialization, context propagation, and signal-specific best practices to avoid missing data, broken correlations, or invalid span/metric semantics.

Core Features & Use Cases

  • Traces, metrics, and logs setup: Initialize TracerProvider, MeterProvider, and LoggerProvider in a Go codebase with correct resource attributes and propagation configuration.
  • Span and attribute correctness: Apply Go-specific span naming, span kind decisions, HTTP status to span status mapping, and context hygiene to prevent orphan spans and misleading topology.
  • Messaging propagation across Kafka/SQS/RabbitMQ: Implement the producer/consumer model using span Links for consumer spans to preserve accurate workflow boundaries.
  • Cross-signal audit support: Use a checklist-driven audit flow (via Tsuga CLI guidance) to verify presence, correlation, naming quality, and cardinality issues across traces/metrics/logs.
  • Safety for sensitive data: Follow strict rules for not emitting credentials/PII into spans, logs, and metrics.

Quick Start

Use the otel-go skill when you need help adding or fixing OTel SDK setup or instrumentation in a confirmed Go service, and ask it to propose the minimal change plan before you apply any code updates.

Frequently Asked Questions about otel-go

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

FAQPage Schema
How do I initialize the OpenTelemetry SDK in a Go service?

To initialize the OpenTelemetry SDK in a Go service, configure the TracerProvider, MeterProvider, and LoggerProvider with correct resource attributes and propagation settings. This ensures traces, metrics, and logs are properly exported and correlated.

How do I propagate OpenTelemetry context across Kafka or RabbitMQ in Go?

Propagate OpenTelemetry context across Kafka or RabbitMQ by implementing the producer/consumer model with span Links for consumer spans. This preserves accurate workflow boundaries in async messaging and prevents broken trace correlations.

How do I prevent sensitive data from leaking into OpenTelemetry traces and metrics?

Prevent sensitive data leaks in OpenTelemetry traces, logs, and metrics by following strict rules to avoid emitting credentials or PII into attributes. This ensures safe sensitive-data handling during instrumentation.

What is the best way to map HTTP status to OpenTelemetry span status in Go?

The best way to map HTTP status to OpenTelemetry span status in Go is to apply Go-specific span naming and status mapping rules. Correct context hygiene prevents orphan spans and misleading topology in distributed tracing.

How do I audit OpenTelemetry traces, metrics, and logs for cardinality issues?

Audit OpenTelemetry traces, metrics, and logs for cardinality issues by using a checklist-driven flow to verify presence, correlation, and naming quality. This cross-signal audit validates low-cardinality attributes across all signals.

Does OpenTelemetry instrumentation in Go require explicit confirmation before applying changes?

OpenTelemetry instrumentation in Go requires explicit user confirmation before applying changes due to a mutation gate. The system proposes a minimal change plan and waits for approval before modifying the codebase.