tracing-opentelemetry

OpenTelemetry integration layer for the tracing ecosystem in Rust

Library
Cargo
v0.34.0
414 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
66 /100 Good
Development Activity 56
Maintenance 44
Community 84
Maturity 52
Momentum 28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
75 /100 Good
Architecture 82
Code Quality 80
Innovation 72
Learning Curve 65

tracing-opentelemetry bridges Rust’s tracing instrumentation framework with the OpenTelemetry ecosystem. It provides a tracing-subscriber Layer that converts tracing spans and events into OpenTelemetry spans, metrics, and context, so applications instrumented with tracing can export distributed traces to any OpenTelemetry-compatible backend (Jaeger, Zipkin, OTLP collectors).

Maintained under the tokio-rs organization alongside the core tracing crate, it’s the de facto standard way to get OpenTelemetry-compatible distributed tracing out of a tracing-instrumented Rust service without rewriting instrumentation calls.

What You Get

  • OpenTelemetryLayer - a tracing-subscriber Layer that converts tracing spans into OpenTelemetry spans automatically
  • OpenTelemetrySpanExt - inject/extract trace context across service boundaries, and set attributes/status/events on the current span
  • Optional MetricsLayer (via the metrics feature) for exporting OpenTelemetry metrics from specifically-named tracing events
  • Interop with any OpenTelemetry exporter (OTLP, Jaeger, Zipkin) since it only produces standard OpenTelemetry spans

Common Use Cases

  • Adding distributed tracing to an existing tracing-instrumented Rust web service (Axum, Actix, Tonic) with minimal code changes
  • Exporting traces to Jaeger or an OTLP collector for latency debugging across microservices
  • Propagating trace context across async task boundaries and network calls via OpenTelemetrySpanExt
  • Emitting OpenTelemetry metrics from tracing events using the optional metrics feature

Under The Hood

Architecture - The crate is a tracing_subscriber::Layer implementation (layer.rs, part of a 4,300-line src/ tree) that hooks into tracing’s span lifecycle callbacks (on_new_span, on_enter, on_close, on_event) and mirrors them into OpenTelemetry Span objects held in an internal registry extension (stack.rs, otel_context.rs); span_ext.rs implements OpenTelemetrySpanExt for cross-boundary context propagation, and metrics.rs provides the optional MetricsLayer. Tech Stack - Built directly on opentelemetry 0.32, tracing/tracing-core/tracing-subscriber 0.3, with optional tracing-log and smallvec dependencies; dev-dependencies include criterion for benchmarking and opentelemetry_sdk’s testing feature for span assertion in tests. Notably the crate’s own version numbers are intentionally decoupled from the opentelemetry crate’s versioning (documented in the README, referencing issue #170), which is an important compatibility gotcha for consumers pinning versions. Code Quality - A dedicated tests/ directory covers parent/child span relationships (parents.rs, follows_from.rs), context propagation (trace_state_propagation.rs), parallel/async spans (parallel.rs), and error handling (errors.rs); five runnable examples/ (including OTLP export and remote-context propagation) double as both documentation and integration smoke tests. API Design - The API surface is intentionally small: one Layer to install (OpenTelemetryLayer::new(tracer)), one extension trait for manual control, and feature flags to opt into metrics. This keeps day-one setup low-boilerplate, though users must independently understand tracing_subscriber’s Layer/Registry model and OpenTelemetry’s SDK setup to wire it together correctly.

Used by 9 apps in this directory

Rust
58%
Other

Cap

Team Chat · Video Conferencing

24,546

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
64
Dependency
Built with
Rust 58%
TypeScript 34%
Updated 1 weeks ago
Go
35%
Apache 2.0

CubeSandbox

AI Agents · Developer Tools · Security

13,184

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
84
Repo Health
88
Technical
63
Dependency
Built with
Go 35%
Rust 24%
C 21%
Updated 1 weeks ago
Rust
99%
Other

Fluree DB

Databases

480

A temporal, verifiable graph database with git-like branching, integrated vector/text/geo search, and RDF/SPARQL/JSON-LD/openCypher support — benchmarked at 10.4x faster than the next database on the full Wikidata dump.

View details
88
Repo Health
74
Technical
65
Dependency
Built with
Rust 99%
Updated 1 weeks ago
TypeScript
62%
EPL-2.0

Huly Platform

Collaboration · Project Management · Team Chat

28,064

Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.

View details
92
Repo Health
86
Technical
62
Dependency
Built with
TypeScript 62%
Svelte 34%
Updated 1 weeks ago
Rust
70%
Other

iii

Developer Tools · Devops

18,926

Compose, extend, and observe every backend service in real time using three primitives: Workers, Functions, and Triggers.

View details
87
Repo Health
85
Technical
65
Dependency
Built with
Rust 70%
TypeScript 16%
Updated 1 weeks ago
TypeScript
63%
Apache 2.0

Laminar

AI Development · Monitoring

3,477

Open-source observability platform purpose-built for AI agents — trace, evaluate, debug, and monitor at scale with SQL access and real-time replay.

View details
86
Repo Health
76
Technical
65
Dependency
Built with
TypeScript 63%
Rust 36%
Updated 1 weeks ago
TypeScript
88%
MIT

Mistle

AI Agents · Developer Tools

95

Self-hostable platform for running autonomous coding agents in isolated, credentialless sandboxes with brokered credentials, reusable snapshots, and event-driven triggers.

View details
49
Repo Health
76
Technical
67
Dependency
Built with
TypeScript 88%
Rust 11%
Updated 1 months ago
Rust
46%
MIT

Svix

Automation · Developer Tools

3,475

Open source, self-hostable webhook infrastructure that handles delivery, retries, HMAC signing, and multi-tenant event management so you never have to build a webhooks system from scratch.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
Rust 46%
C# 16%
Updated 1 weeks ago
Rust
50%
Apache 2.0

Vibe Kanban

AI Agents · AI Code Assistants · Project Management

28,610

A kanban board for planning work and dispatching Claude Code, Codex, Gemini CLI, and eight other coding agents into isolated git worktrees, then reviewing and merging their diffs from one UI.

View details
78
Repo Health
75
Technical
64
Dependency
Built with
Rust 50%
TypeScript 46%
Updated 1 weeks ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers