{"id":34250260,"url":"https://github.com/firstdorsal/tracing-web-console","last_synced_at":"2026-05-31T19:31:50.498Z","repository":{"id":326730107,"uuid":"1106662501","full_name":"firstdorsal/tracing-web-console","owner":"firstdorsal","description":"A real-time web-based console for Rust applications using the tracing ecosystem","archived":false,"fork":false,"pushed_at":"2025-11-29T18:27:20.000Z","size":1407,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-19T19:09:26.873Z","etag":null,"topics":["axum","dashboard","debugging","logging","rust","tokio","tracing","web-console"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/tracing-web-console","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firstdorsal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-29T17:34:54.000Z","updated_at":"2025-12-06T20:38:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/firstdorsal/tracing-web-console","commit_stats":null,"previous_names":["firstdorsal/tracing-web-console"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/firstdorsal/tracing-web-console","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdorsal%2Ftracing-web-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdorsal%2Ftracing-web-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdorsal%2Ftracing-web-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdorsal%2Ftracing-web-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstdorsal","download_url":"https://codeload.github.com/firstdorsal/tracing-web-console/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstdorsal%2Ftracing-web-console/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33746507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axum","dashboard","debugging","logging","rust","tokio","tracing","web-console"],"created_at":"2025-12-16T09:16:26.266Z","updated_at":"2026-05-31T19:31:50.194Z","avatar_url":"https://github.com/firstdorsal.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tracing-web-console\n\n[![Crates.io](https://img.shields.io/crates/v/tracing-web-console.svg?style=flat)](https://crates.io/crates/tracing-web-console)\n[![Documentation](https://docs.rs/tracing-web-console/badge.svg?style=flat)](https://docs.rs/tracing-web-console)\n[![License](https://img.shields.io/crates/l/tracing-web-console.svg?style=flat)](LICENSE)\n\nA real-time web-based console for Rust applications using the [tracing](https://github.com/tokio-rs/tracing) ecosystem. Drop in a single line of code to get a beautiful, interactive dashboard for monitoring your application's logs.\n\n\u003e **Note:** Currently only [Axum](https://github.com/tokio-rs/axum) is supported as the web framework.\n\n\u003e [!WARNING]\n\u003e **Development Use Only** - This tool is intended for local development and debugging purposes. It is **not suitable for production** environments because:\n\u003e\n\u003e - **No authentication** - The dashboard is publicly accessible to anyone who can reach the endpoint\n\u003e - **Potential secret exposure** - Log messages may contain sensitive data (API keys, tokens, passwords, PII)\n\u003e - **Performance impact** - Storing and streaming logs adds overhead to your application\n\u003e\n\u003e If you need production logging, consider using proper observability tools like OpenTelemetry or similar services with appropriate security controls.\n\n![Dashboard Screenshot](./assets/screenshot-dashboard.png)\n\n## Features\n\n- **Real-time Streaming** - Logs appear instantly via WebSocket connection\n- **Virtual Scrolling** - Handles thousands of logs efficiently with smooth scrolling\n- **Advanced Filtering** - Filter by log level, target, and message content\n- **Target-specific Levels** - Set different log levels for different modules (e.g., `DEBUG` for your app, `WARN` for dependencies)\n- **Filter Presets** - Save and quickly switch between filter configurations\n- **Expandable Log Entries** - Click to view span context and additional fields\n- **Context Menu** - Right-click on targets to quickly create filters\n- **Dark/Light Theme** - Toggle between themes based on preference\n- **Export Logs** - Download filtered logs as JSON\n- **Zero Configuration** - Works out of the box with sensible defaults\n- **Embedded Frontend** - No separate frontend deployment needed; assets are embedded in the binary\n\n![Filters Screenshot](./assets/screenshot-filters.png)\n\n## Installation\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dependencies]\ntracing-web-console = \"0.1\"\n```\n\n## Quick Start\n\n```rust\nuse axum::Router;\nuse axum::routing::get;\nuse tracing_web_console::TracingLayer;\n\n#[tokio::main]\nasync fn main() {\n    // Create your app router\n    let app = Router::new()\n        .route(\"/\", get(|| async { \"Hello World\" }))\n        // Add the tracing dashboard at /tracing\n        .merge(TracingLayer::new(\"/tracing\").into_router());\n\n    // Start the server\n    let listener = tokio::net::TcpListener::bind(\"0.0.0.0:3000\")\n        .await\n        .unwrap();\n\n    println!(\"Dashboard available at http://localhost:3000/tracing\");\n\n    axum::serve(listener, app).await.unwrap();\n}\n```\n\nThat's it! Navigate to `http://localhost:3000/tracing` to view your logs.\n\n## Configuration\n\n### Custom Base Path\n\nMount the dashboard at any path:\n\n```rust\nTracingLayer::new(\"/admin/logs\")  // Dashboard at /admin/logs\nTracingLayer::new(\"/debug\")       // Dashboard at /debug\n```\n\n### Storage Capacity\n\nConfigure how many log events to keep in memory:\n\n```rust\n// Store up to 50,000 events (default: 10,000)\nTracingLayer::with_capacity(\"/tracing\", 50_000)\n```\n\n## Screenshots\n\n### Dashboard Overview\n\n![Dashboard](./assets/screenshot-dashboard.png)\n\n### Filter Presets\n\n![Presets](./assets/screenshot-presets.png)\n\n### Dark Theme\n\n![Dark Theme](./assets/screenshot-dark.png)\n\n## API Endpoints\n\nThe following HTTP endpoints are available under your configured base path:\n\n| Endpoint       | Method | Description                            |\n| -------------- | ------ | -------------------------------------- |\n| `/`            | GET    | Serves the web dashboard               |\n| `/api/logs`    | POST   | Query logs with filters and pagination |\n| `/api/targets` | GET    | List all unique log targets            |\n| `/api/ws`      | GET    | WebSocket endpoint for real-time logs  |\n\n### Query Logs\n\n```bash\ncurl -X POST http://localhost:3000/tracing/api/logs \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"limit\": 100,\n    \"offset\": 0,\n    \"global_level\": \"debug\",\n    \"target_levels\": {\"my_app\": \"trace\"},\n    \"search\": \"error\",\n    \"sort_order\": \"newest_first\"\n  }'\n```\n\n## Development\n\n### Prerequisites\n\n- Rust 1.70+\n- Node.js 18+ and pnpm (for frontend development)\n\n### Building\n\n```bash\n# Build the entire project (includes frontend)\ncargo build\n\n# Run the example server\ncargo run -p example-server\n```\n\n### Frontend Development\n\n```bash\ncd tracing-web-console/frontend\npnpm install\npnpm dev  # Start dev server with hot reload\n```\n\n## How It Works\n\n1. **TracingLayer** implements `tracing_subscriber::Layer` to capture all log events\n2. Events are stored in a thread-safe circular buffer with configurable capacity\n3. The web dashboard is served as embedded static assets (no external files needed)\n4. Real-time updates are pushed to connected clients via WebSocket\n5. Filtering is performed server-side for efficiency\n\n## Performance Considerations\n\n- **Circular Buffer**: Old logs are automatically evicted when capacity is reached\n- **Virtual Scrolling**: The frontend only renders visible log entries\n- **Server-side Filtering**: Filtering happens on the server to minimize data transfer\n- **Efficient Updates**: Only new logs are sent over WebSocket, not the entire buffer\n\n## License\n\nThis project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See [LICENSE](LICENSE) for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstdorsal%2Ftracing-web-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstdorsal%2Ftracing-web-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstdorsal%2Ftracing-web-console/lists"}