| Crates.io | premix-metrics |
| lib.rs | premix-metrics |
| version | 0.1.0 |
| created_at | 2026-01-20 20:34:37.140778+00 |
| updated_at | 2026-01-20 20:34:37.140778+00 |
| description | Prometheus metrics helpers for Premix ORM. |
| homepage | |
| repository | https://github.com/premix-labs/premix-orm |
| max_upload_size | |
| id | 2057527 |
| size | 46,000 |
Prometheus metrics helpers for Premix ORM.
use premix_metrics::{install_prometheus_recorder, record_pool_stats};
use premix_orm::prelude::*;
# async fn example() -> Result<(), Box<dyn std::error::Error>> {
let handle = install_prometheus_recorder()?;
let pool = Premix::smart_sqlite_pool("sqlite:app.db").await?;
record_pool_stats(&pool, "sqlite");
println!("{}", handle.render());
# Ok(())
# }
Enable query latency metrics by compiling premix-orm with the metrics feature:
premix-orm = { version = "1.0.6-alpha", features = ["metrics"] }