opentelemetry-rust

Community

Master Rust observability with OpenTelemetry.

Authorcedricziel
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides expert guidance for instrumenting Rust applications with OpenTelemetry, enabling you to add structured tracing, metrics, and telemetry using the official Rust SDK and OTLP exporters.

Core Features & Use Cases

  • Manual instrumentation with the OpenTelemetry Rust API to create spans and propagate context.
  • Metrics collection using the OpenTelemetry Rust SDK (counters, histograms, gauges) and OTLP exporters.
  • Integration with the tracing crate for structured logging and interoperability.
  • HTTP server/client instrumentation for frameworks like Axum, Actix-web, Rocket, and Tonic-based services.
  • Resource attributes and semantic conventions to standardize telemetry across services.
  • Production-ready patterns: context propagation, error recording, and exporter configuration for scalable observability.

Quick Start

  1. Add dependencies to Cargo.toml: [dependencies] opentelemetry = "0.27" opentelemetry-sdk = "0.27" opentelemetry-otlp = "0.27" tokio = { version = "1", features = ["full"] }
  2. Initialize tracer/provider at startup and set it as the global provider: use opentelemetry::{global, trace::Tracer}; // Build and install provider, then use global::set_tracer_provider(provider);
  3. Create a span around a work unit to instrument code: let tracer = global::tracer("my-service"); tracer.in_span("operation-name", |cx| { // your work here });

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: opentelemetry-rust
Download link: https://github.com/cedricziel/claude-otel-plugin/archive/main.zip#opentelemetry-rust

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.