Collect, aggregate, and export metrics from any application. Zero dependencies, pluggable exporters, and a simple API.
Under 50KB compiled binary. No external dependencies. Minimal memory footprint even at high throughput.
Ship metrics to Prometheus, StatsD, OTLP, or build your own exporter. Switch backends without changing application code.
Three metric types — Counter, Gauge, Histogram. Intuitive interface designed for developers, not operations teams.
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")