rust-metrics

Expose Prometheus-compatible metrics from Rust applications using the metrics crate.

1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/gar-ai/mallorn --skill rust-metrics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-metrics
Source: https://github.com/gar-ai/mallorn/tree/main/.claude/skills/rust-observability-metrics
Command: npx skills add https://github.com/gar-ai/mallorn --skill rust-metrics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Expose Prometheus-compatible metrics from Rust applications for production monitoring.

Core Features & Use Cases

  • Instrument Rust services using the metrics crate to expose counters, gauges, and histograms.
  • Quickly surface observability data to dashboards and alerting pipelines via a Prometheus exporter.
  • Suitable for server-side services, batch jobs, and microservices requiring lightweight telemetry.

Quick Start

Initialize and run the Prometheus exporter in your Rust service to expose metrics on port 9100.

Frequently Asked Questions about rust-metrics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose Prometheus metrics from a Rust service?

To expose Prometheus metrics from a Rust service, initialize and run the Prometheus exporter on a specified port to start instrumenting counters, gauges, and histograms using the metrics crate.

What is the best way to add observability telemetry to Rust batch jobs?

Adding observability telemetry to Rust batch jobs is best achieved by instrumenting the code with counters and histograms, allowing lightweight data to surface directly to alerting pipelines and dashboards via a Prometheus exporter.

Can I use the metrics crate to track histograms and gauges in Rust microservices?

Yes, you can use the metrics crate to track histograms and gauges in Rust microservices, providing templates and guidance for defining various metric types suitable for production monitoring and lightweight telemetry.

Does this Prometheus exporter setup work for both server-side and batch contexts?

This Prometheus exporter setup works for both server-side services and batch contexts, offering initialization templates and metric definitions that cover counters, gauges, and histograms for comprehensive observability.

What port does the Prometheus exporter use by default in Rust applications?

The Prometheus exporter uses port 9100 by default in Rust applications, requiring you to initialize and run the exporter within your service to successfully expose the collected observability data.

Why do I need to initialize a Prometheus exporter for Rust production monitoring?

You need to initialize a Prometheus exporter for Rust production monitoring to quickly surface collected telemetry data from your application to external dashboards and alerting pipelines for observability.