golang-observability-opentelemetry

golang-observability-opentelemetry is a skill for Claude Code from bobmatnyc/claude-mpm-skills. It costs 31 tokens per session (6,208 once invoked), scanned A, original, MIT.

A guide to adding traces, metrics, and structured logs to Go applications. Traces show requests across services, metrics record measurements, and logs record structured events.

In plain words
What is it for?
Use it to add OpenTelemetry tracing, Prometheus metrics, JSON logs with correlation IDs, HTTP or gRPC instrumentation, health checks, and clean shutdown behavior.
Why use it?
It helps diagnose production failures and slowdowns by connecting application activity, measurements, and log messages across service boundaries.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

not rated 75repo +1 1mo ago A scan Socket: passSnyk: passSkillSpector: pass 31 tokens original MIT

Good fit Use it to add OpenTelemetry tracing, Prometheus metrics, JSON logs with correlation IDs, HTTP or gRPC instrumentation, health checks, and clean shutdown behavior.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bobmatnyc/claude-mpm-skills/golang-observability-opentelemetry
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add bobmatnyc/claude-mpm-skills --skill golang-observability-opentelemetry
Clone the repo
git clone --depth 1 https://github.com/bobmatnyc/claude-mpm-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for golang-observability-opentelemetry

README.md
[![agentmods](https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/golang-observability-opentelemetry/github.svg)](https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/golang-observability-opentelemetry)
Your own site
<a href="https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/golang-observability-opentelemetry"><img src="https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/golang-observability-opentelemetry/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for golang-observability-opentelemetry

Your own site · 80×15
<a href="https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/golang-observability-opentelemetry"><img src="https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/golang-observability-opentelemetry.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,208 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 May 2026
  • Snyk pass 18 May 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.06208
Opus 5 $0.00015 $0.03104
Sonnet 5 $0.00006 $0.01242
Haiku 4.5 $0.00003 $0.00621

Measured 12d ago against content hash 66f8881332b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

golang-observability-opentelemetry scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

toolchains/golang/golang-observability-opentelemetry/SKILL.md · 986 lines

How it starts

The opening of the file, as written. The whole thing — 986 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go Observability with OpenTelemetry

Overview

Modern Go applications require comprehensive observability through the three pillars: traces, metrics, and logs. OpenTelemetry provides vendor-neutral instrumentation for distributed tracing, Prometheus offers powerful metrics collection, and Go's slog package (1.21+) delivers structured logging with minimal overhead.

Key Features:

  • 🔍 OpenTelemetry: Distributed tracing with context propagation
  • 📊 Prometheus: Metrics collection with /metrics endpoint
  • 📝 Structured Logging: slog with JSON formatting and correlation IDs
  • 🎯 Auto-Instrumentation: HTTP/gRPC middleware patterns
  • 💚 Health Checks: Kubernetes-ready readiness/liveness probes
  • 🔄 Graceful Shutdown: Clean exporter shutdown and signal handling

When to Use This Skill

Activate this skill when:

  • Instrumenting microservices for production observability
  • Setting up distributed tracing across service boundaries
  • Creating operational dashboards with Prometheus/Grafana
  • Debugging production performance issues or bottlenecks
  • Implementing SLOs and monitoring SLIs
  • Adding observability to existing Go applications
  • Correlating logs, traces, and metrics for debugging

Core Observability Principles

The Three Pillars

  1. Traces: Understand request flow across distributed systems
  2. Metrics: Measure system behavior and performance over time
  3. Logs: Record discrete events for debugging and audit

Correlation Strategy

All three pillars must share common identifiers:

  • Trace ID: Links all operations in a request
  • Span ID: Identifies specific operation within trace
  • Request ID: Correlates logs with traces and metrics

OpenTelemetry Integration

Installation

go get go.opentelemetry.io/otel
go get go.opentelemetry.io/otel/sdk
go get go.opentelemetry.io/otel/exporters/jaeger
go get go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp

Basic Setup

package main

import (
    "context"
    "log"

    "go.opentelemetry.io/otel"
    "go.opentelemetry.io/otel/exporters/jaeger"
    "go.opentelemetry.io/otel/sdk/resource"
    sdktrace "go.opentelemetry.io/otel/sdk/trace"
    semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
)

func initTracer(serviceName string) (*sdktrace.TracerProvider, error) {
    // Create Jaeger exporter
    exporter, err := jaeger.New(jaeger.WithCollectorEndpoint(
        jaeger.WithEndpoint("http://localhost:14268/api/traces"),
    ))
    if err != nil {
        return nil, err
    }

    // Create resource with service name
    res, err := resource.Merge(
        resource.Default(),
        resource.NewWithAttributes(
            semconv.SchemaURL,
            semconv.ServiceName(serviceName),
            semconv.ServiceVersion("1.0.0"),
        ),
    )
    if err != nil {
        return nil, err
    }

    // Create tracer provider
    tp := sdktrace.NewTracerProvider(
        sdktrace.WithBatcher(exporter),
        sdktrace.WithResource(res),
        sdktrace.WithSampler(sdktrace.AlwaysSample()), // Use probability sampler in production
    )

    otel.SetTracerProvider(tp)
    return tp, nil
}

func main() {
    tp, err := initTracer("order-service")
    if err != nil {
        log.Fatal(err)
    }
    defer func() {
        if err := tp.Shutdown(context.Background()); err != nil {
            log.Printf("Error shutting down tracer: %v", err)
        }
    }()

    // Application code...
}

Read the full file on GitHub · 986 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 986 lines · 31 tokens per session scan A 66f8881332b2

Subscribe to this mod's changes

golang-observability-opentelemetry is a skill published in the GitHub repository bobmatnyc/claude-mpm-skills (75 stars, last pushed 1mo ago), licensed MIT. It adds 31 tokens to every session and 6,208 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

Observability & Monitoring

Structured logging, metrics, distributed tracing, and alerting strategies.

ArieGoldkin/ai-agent-hub · 17 tokens

opentelemetry-net-instrumentation

Provides guidance for implementing OpenTelemetry instrumentation in .NET codebases, covering tracing (Activities/Spans), metrics, logs, naming conventions, error handling, performance, SDK setup, resources, context propagation, and API design best practices.

Aaronontheweb/dotnet-skills · 56 tokens

monitoring-observability

Monitoring and observability patterns for Prometheus metrics, Grafana dashboards, Langfuse v4 LLM tracing (astype, scorecurrentspan, shouldexportspan, LangfuseMedia), and drift detection. Use when adding logging, metrics, distributed tracing, LLM cost tracking, or quality drift monitoring.

yonatangross/orchestkit · 69 tokens

vendor-update

Upgrade Go/Node.js vendor dependencies and sync tool versions. Use whenever the user says "upgrade dependencies", "update vendors", "vendor update", "run vendor-upgrade", "bump dependencies", "update packages", or asks to run the vendor-update Make target. This skill also checks scripts/build/version.mk after…

apache/skywalking-banyandb · 95 tokens

frontmcp-observability

Use when adding tracing, structured logging, metrics, or monitoring to a FrontMCP server. Covers zero-config OpenTelemetry distributed tracing across all flows; the this.telemetry API for custom spans, events, and attributes in tools, plugins, agents, and skills; structured JSON logging with trace correlation and…

agentfront/frontmcp · 177 tokens

compiling

Compile and build the SkyWalking BanyanDB project. Use when the user asks to compile, build, or generate code for this project.

apache/skywalking-banyandb · 31 tokens