Lightweight application metrics for modern services

Collect, aggregate, and export metrics from any application. Zero dependencies, pluggable exporters, and a simple API.

pip install metricflow
Get Started View Release Notes

Lightweight

Under 50KB compiled binary. No external dependencies. Minimal memory footprint even at high throughput.

Pluggable Exporters

Ship metrics to Prometheus, StatsD, OTLP, or build your own exporter. Switch backends without changing application code.

Simple API

Three metric types — Counter, Gauge, Histogram. Intuitive interface designed for developers, not operations teams.

Quick Start

import metricflow

# Initialize with default configuration
mf = metricflow.init()

# Create and use metrics
requests = mf.counter("http_requests_total", labels=["method", "path"])
latency = mf.histogram("request_duration_seconds", buckets=[0.1, 0.5, 1.0, 5.0])

requests.inc(method="GET", path="/api/users")
latency.observe(0.042, method="GET", path="/api/users")