console-subscriber

tracing-subscriber Layer that powers tokio-console, a debugger for async Rust

Library
Cargo
v0.5.0
4,581stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
66/100Good
Development Activity52
Maintenance52
Community60
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture80
Code Quality78
Innovation82
Learning Curve62

console-subscriber is the instrumentation half of tokio-console, a diagnostics and debugging toolkit for asynchronous Rust programs. It implements a tracing_subscriber::Layer that collects task, resource, and runtime diagnostic data from a running Tokio application and streams it over a gRPC wire protocol to the companion tokio-console command-line client — effectively giving async Rust programs a top(1)-like live view of their tasks.

Adding console_subscriber::init() to an application’s main function (with the tokio_unstable cfg flag enabled) exposes task polling, wakeups, and resource data that the separate tokio-console CLI tool then visualizes interactively, without requiring custom instrumentation code in application logic.

What You Get

  • console_subscriber::init() — a one-line setup to start streaming diagnostic data from a Tokio application
  • A configurable Builder API for customizing retention, bind address, and recording behavior
  • An in-process aggregator that tracks task polls, wakeups, spawns, and resource lifecycles
  • A gRPC server (via the console-api/tonic wire protocol) that the tokio-console CLI connects to
  • Built-in lint-style warnings (self-wakes, lost wakers, never-yielded tasks, auto-boxed/large futures) surfaced through the CLI

Common Use Cases

  • Diagnosing why an async Rust service is dropping frames, stalling, or spending time on unexpectedly costly tasks
  • Finding tasks that never yield, hold locks too long, or wake themselves excessively (self-wake loops)
  • Getting a live top(1)-style view of all running Tokio tasks in a production or development process
  • Auditing runtime health of a Tokio-based application without modifying its business logic

Under The Hood

Architecture — console-subscriber is one of three crates in the tokio-rs/console workspace: console-api (generated gRPC/protobuf types for the wire protocol), console-subscriber (this package — the instrumentation-side tracing_subscriber::Layer), and tokio-console (the interactive CLI client). Inside console-subscriber/src, an aggregator module maintains in-memory task/resource state built from tracing callsite events (callsites.rs, visitors.rs, attribute.rs), which builder.rs wires into a gRPC server exposed to remote tokio-console clients over the protocol defined in console-api.

Tech Stack — Rust (82.5% of the overall repo, the remainder mostly TypeScript for the docs/website), built on tracing/tracing-subscriber for instrumentation hooks, tonic/prost for the gRPC wire format, and Tokio itself as the async runtime being instrumented. Requires the nightly-only tokio_unstable cfg flag on the instrumented application since it depends on Tokio’s unstable diagnostic APIs.

Code Qualityconsole-subscriber/tests contains integration tests (framework.rs, poll.rs, spawn.rs, wake.rs) exercising the aggregator against realistic task-lifecycle scenarios, backed by a support test-helper module. The workspace uses release-plz and cliff.toml for changelog/release automation and ships a SECURITY.md disclosure policy, indicating disciplined release and security practices for a project embedded in the official Tokio organization.

API Design — The single-call console_subscriber::init() entrypoint minimizes integration friction for the common case, while the Builder API exposes finer-grained configuration (retention window, bind address) for production deployments. The unavoidable requirement to recompile with RUSTFLAGS="--cfg tokio_unstable" is an explicit tradeoff the project accepts in exchange for access to Tokio’s richer, unstable instrumentation hooks rather than a slower-evolving stable API.

Used by 6 apps in this directory

Dart
74%
AGPL 3.0

AppFlowy

Productivity · Project Management · Collaboration

75,729

The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.

View details
66
Repo Health
81
Technical
66
Dependency
Built with
Dart74%
Rust24%
Updated 1 weeks ago
Rust
69%
Other

GitButler

Developer Tools · Devops · AI Development

21,531

Git, but better — a modern version control client with stacked branches, parallel workflows, unlimited undo, and first-class support for AI-powered development.

View details
89
Repo Health
84
Technical
68
Dependency
Built with
Rust69%
TypeScript18%
Svelte12%
Updated today
Rust
96%
Apache 2.0

InfluxDB

Databases · Analytics

31,705

Open-source time-series database built for real-time ingest, fast SQL queries, and embedded Python automation — powered by Apache Arrow and Parquet.

View details
86
Repo Health
76
Technical
72
Dependency
Built with
Rust96%
Updated yesterday
TypeScript
38%
AGPL 3.0

OpenObserve

Monitoring · Analytics · Devops

21,267

Open source observability platform for logs, metrics, traces, and real user monitoring — delivering 140x lower storage costs than Elasticsearch with a single binary you can run in under 2 minutes.

View details
89
Repo Health
9
Technical
73
Dependency
Built with
TypeScript38%
Rust28%
Vue18%
Updated today
Rust
63%
MIT

PostgresML

Databases · AI Development

6,817

Run ML training and LLM inference natively inside PostgreSQL with GPU acceleration — no data movement required.

View details
51
Repo Health
76
Technical
65
Dependency
Built with
Rust63%
JavaScript11%
Updated 1 years ago
Rust
89%
Apache 2.0

Qdrant

Databases · AI Development · Search

34,058

Open-source vector database and search engine built in Rust for production-grade AI applications — from semantic search to RAG pipelines and recommendation systems.

View details
92
Repo Health
87
Technical
69
Dependency
Built with
Rust89%
Updated yesterday

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

Search