axum-impl-tracing
OfficialGet correct, structured Axum request traces
Software Engineering#tracing#OpenTelemetry#structured logging#axum#tracing-subscriber#TraceLayer#async instrumentation
AuthorImpertio-Studio
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill prevents misleading, interleaved, or incorrect tracing output in Axum by guiding you to install a tracing-subscriber correctly and emit structured spans and events safely in async code.
Core Features & Use Cases
- Safe subscriber initialization: install the global subscriber exactly once in main using EnvFilter and fmt layers.
- Deterministic request tracing middleware: instrument every HTTP request with tower-http TraceLayer::new_for_http and its span naming via MatchedPath.
- Async-safe span creation and logging: use #[tracing::instrument] or Future::instrument instead of holding Span::enter guards across await, and emit key/value fields (with %/? sigils) rather than interpolated messages.
- Optional distributed tracing export: compose tracing-opentelemetry onto the same registry for OpenTelemetry backends (OTLP).
- Use cases: debugging “no logs appear,” startup panics from double init, incorrect span nesting/parenting, broken span cardinality caused by using the raw URI, and exporting traces to Jaeger/Tempo/Grafana.
Quick Start
Configure your Axum app by wiring tracing-subscriber in main, add TraceLayer::new_for_http to your router, and instrument handlers with #[tracing::instrument] while emitting structured tracing::info!/error! fields.
Dependency Matrix
Required Modules
None requiredComponents
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: axum-impl-tracing Download link: https://github.com/Impertio-Studio/Axum-Claude-Skill-Package/archive/main.zip#axum-impl-tracing Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.