rust-observability

Implement tracing, metrics, and structured logging for Rust services.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/matthewharwood/engmanager_xyz --skill rust-observability
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-observability
Source: https://github.com/matthewharwood/engmanager_xyz/tree/main/.claude/skills/rust-observability
Command: npx skills add https://github.com/matthewharwood/engmanager_xyz --skill rust-observability

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adds production-grade observability to Rust services with structured logging, distributed tracing, metrics, and health endpoints to improve reliability.

Core Features & Use Cases

  • Structured Logging: JSON logs with tracing_subscriber.
  • Instrumented Functions & Tracing: automatic spans.
  • OpenTelemetry & Prometheus: integrate tracing and metrics.

Quick Start

Initialize tracing and metrics and instrument key paths in your app.

Frequently Asked Questions about rust-observability

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

FAQPage Schema
How do I add structured logging and tracing to a Rust application?▼

Structured logging in Rust uses tracing_subscriber to emit JSON logs with context. Instrument functions with #[instrument] macros to create automatic spans, then configure a tracing subscriber to capture and export logs with full trace context for debugging distributed requests.

Can I integrate OpenTelemetry and Prometheus metrics into my Rust service?▼

Yes. OpenTelemetry collects traces and metrics from your Rust application, while Prometheus exporters expose those metrics for scraping. Configure both together to unify tracing, metrics, and structured logs in one observability pipeline.

What's the best way to correlate requests across multiple Rust microservices?▼

Correlation context propagation embeds trace IDs in request headers so spans from different services link together. Implement this by extracting parent trace context on ingress and injecting it into outbound requests, enabling end-to-end request tracking.

How do I instrument specific functions with tracing spans in Rust?▼

Apply the #[instrument] macro from the tracing crate to functions you want to trace. This automatically creates spans, captures function arguments as fields, and records their execution time, giving visibility into hot paths and error sources.

Do I need health checks alongside observability in Rust services?▼

Health checks complement observability by exposing service status on a dedicated endpoint. Implement them alongside tracing and metrics to enable orchestrators to detect failures faster and route traffic away from degraded instances.

What are the limitations of structured logging without distributed tracing in Rust?▼

Structured logs alone don't show request flow across services or execution context. Distributed tracing with OpenTelemetry adds causal relationships, timing data, and automatic span correlation, turning isolated logs into a coherent request timeline.