🚀 Cirious Codex Metrics
A unified telemetry and Prometheus exposition layer for robust Rust applications.
📖 Overview
Cirious Codex Metrics is a lightweight, high-performance Rust crate designed to standardize observability. By unifying tracing for structured logging and span execution with the metrics ecosystem for Prometheus exposition, it provides developers with a frictionless, drop-in path to production-grade telemetry.
Instead of configuring multiple overlapping libraries in every new project, cirious_codex_metrics offers a single initialization point to get your logs formatted and your Prometheus /metrics endpoint serving immediately.
📋 Quick Start
Add the following to your Cargo.toml:
[]
= "0.1.0"
Basic Usages
use ;
use SocketAddr;
use Duration;
async
🚧 Current Status & Roadmap
✅ v0.1.0 — Initial Release (Completed)
- Ecosystem Logger Integration: Intercept lifecycle state using native codex_logger dispatchers, eliminating redundant external dependencies.
- Ecosystem Result Integration: Use
cirious_codex_resultfor structured error handling and result types. - Format Profile Support: Native compliance with JsonFormatter and StyledTerminalFormatter for environmental log layout switching.
- Prometheus Exporter Setup: Integrate
metrics-exporter-prometheusto automatically manage registries and formatting. - Standalone HTTP Endpoint: Spin up a lightweight, background HTTP listener dedicated to serving the
/metricsscrape target. - Ergonomic Facade Re-exports: Module isolation for
metrics_registryandtokioto keep user dependencies clean. - Documentation & Examples: Write comprehensive doc comments and provide runnable workspace integration examples.
- Publish: push
cirious_codex_metricstocrates.ioas a standalone crate.
🚀 v0.2.0 — Production Readiness & Integrations (Planned)
- Ecosystem Error Handling Integration: Transition from raw panic statements on HTTP socket binding failures to structured diagnostic returns leveraging
cirious_codex_result::CodexError. - HTTP Middleware (Tower/Axum): Deliver plug-and-play middleware configurations to systematically track server request rates, routing latencies, and error counters.
- Host System Metrics: Implement automated background loop scraping for runtime system parameters (CPU cycles, memory allocation, and OS threads).
📜 License
Licensed under either of the following, at your option: