client_rust
Prometheus Rust Client is an OpenMetrics-compliant library for instrumenting Rust applications with metrics. It enables operators to monitor applications using Prometheus and other compatible systems.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | prometheus/client_rust |
| Owner | prometheus |
| Primary language | Rust |
| License | Apache-2.0 — OSI-approved |
| Stars | 602 |
| Forks | 111 |
| Open issues | 74 |
| Latest release | v0.25.0 (2026-06-15) |
| Last updated | 2026-07-07 |
| Source | https://github.com/prometheus/client_rust |
What client_rust is
A type-safe, no-unsafe Rust implementation of the OpenMetrics specification for metric instrumentation. Exposes Counter, Histogram, Gauge, and Info metric types with compile-time validation and performance-optimized design.
Get the client_rust source
Clone the repository and explore it locally.
git clone https://github.com/prometheus/client_rust.gitcd client_rust# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Type-safe API leverages Rust's compile-time guarantees; developers unfamiliar with Prometheus instrumentation patterns should review examples on docs.rs.
- No unsafe code within the library; suitable for high-security contexts, though security impact of dependencies requires separate audit.
- Early-stage specification compliance; 9+ unimplemented OpenMetrics features mean some metric types (summary, state set, gauge histogram) are not yet available.
- Latest release v0.25.0 (2026-06-15) with active development; review changelog for breaking changes in minor versions.
- Dual-licensed under Apache-2.0 and MIT; choose one license path for your codebase; contributions require dual-license consent.
When to avoid it — and what to weigh
- Incomplete OpenMetrics support required — README lists 9+ unimplemented specification features (state set metric, gauge histogram, summary metric, unit enforcement, etc.); do not use if these are critical.
- Legacy Prometheus client ecosystem preference — If your team uses rust-prometheus extensively, switching carries adoption cost; see comparison link in README for detailed differences.
- No-dependency or minimal-dependency constraint — Library dependencies not detailed; requires review if ultra-lightweight runtime is mandatory.
- Immediate production support SLA needed — Open source project with 74 open issues; no commercial support contract evident; suitable only for teams comfortable with community-driven maintenance.
License & commercial use
Dual-licensed under Apache License 2.0 and MIT. Both are permissive OSI licenses. Choose one for your project; contributors must agree to dual licensing.
Both Apache-2.0 and MIT are permissive OSI licenses that permit commercial use, modification, and distribution with minimal restrictions (retain license/copyright notice). No explicit commercial support, indemnification, or warranty from the Prometheus project is stated. Commercial deployments should assume community-only support unless arranged separately.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
Library uses no unsafe code, improving memory safety. Metric collection does not handle untrusted network input directly. Security posture depends on: (1) dependencies' security status (not analyzed here), (2) web framework integration for /metrics endpoint (e.g., rate limiting, authentication), (3) cardinality explosion risk from high-dimensional labels (user responsibility). No known CVE data provided.
Alternatives to consider
rust-prometheus (tikv)
Mature alternative with broader feature set; comparison linked in README. Use if full OpenMetrics feature parity or existing TiKV ecosystem integration is required.
OpenTelemetry Rust SDK
Broader observability layer supporting metrics, logs, and traces; better for unified signal correlation. Use if distributed tracing and log context propagation are needed alongside metrics.
Manual metric collection + custom HTTP export
Lightest-weight option if instrumenting a small number of metrics and willing to build format compliance in-house. Not recommended for standard Prometheus workflows.
Build on client_rust with DEV.co software developers
Review the documentation, assess unimplemented OpenMetrics features for your use case, and test integration with your web framework and Prometheus scrape pipeline.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
client_rust FAQ
Can I use this in production?
Is this library feature-complete for OpenMetrics?
Can I use this with frameworks other than Axum?
What is the performance overhead?
Work with a software development agency
From first prototype to production, DEV.co delivers software development services around tools like client_rust. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source observability and beyond.
Evaluate Prometheus Client for your Rust services
Review the documentation, assess unimplemented OpenMetrics features for your use case, and test integration with your web framework and Prometheus scrape pipeline.