mini-apm-cli-0.0.0 is not a library.
MiniAPM
The smallest useful APM. A single-binary, self-hosted application performance monitor and error tracker built on OpenTelemetry.

Features
- Distributed Tracing - Full request-to-response visibility with waterfall visualization
- Error Tracking - Exceptions with stack traces and source context, auto-grouped by fingerprint
- Route Performance - P50, P95, P99 latencies with request counts and error rates
- N+1 Query Detection - Automatically identifies repeated query patterns
- Deploy Tracking - Correlate releases with performance changes
- MCP Integration - Built-in Model Context Protocol server for AI assistants
Quick Start
Docker (recommended)
On first run, you'll see your API key in the logs:
INFO miniapm::server: Single-project mode - API key: proj_abc123...
From Source
Sending Data
Rails with miniapm gem (recommended)
Add to your Gemfile:
Configure in config/initializers/miniapm.rb:
MiniAPM.configure do
config.endpoint =
config.api_key =
config.service_name =
end
Any OpenTelemetry SDK
Configure your OTLP exporter:
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:3000/ingest
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer
Error Tracking API
Deploy Tracking API
Configuration
All configuration is via environment variables:
| Variable | Default | Description |
|---|---|---|
SQLITE_PATH |
./data/miniapm.db |
Database file location |
RUST_LOG |
miniapm=info |
Log level |
RETENTION_DAYS_REQUESTS |
7 |
Days to keep request data |
RETENTION_DAYS_ERRORS |
30 |
Days to keep error data |
RETENTION_DAYS_SPANS |
7 |
Days to keep trace spans |
RETENTION_DAYS_HOURLY_ROLLUPS |
90 |
Days to keep hourly aggregates |
SLOW_REQUEST_THRESHOLD_MS |
500 |
Threshold for slow request alerts |
ENABLE_USER_ACCOUNTS |
false |
Enable multi-user authentication |
ENABLE_PROJECTS |
false |
Enable multi-project mode |
SESSION_SECRET |
(generated) | Required when user accounts enabled |
See .env.example for a complete template.
Multi-User Mode
To enable login and user management:
# Generate a session secret
Default admin credentials on first run:
- Username:
admin - Password:
admin(you'll be prompted to change it)
MCP Integration
MiniAPM includes a Model Context Protocol server for AI assistants like Claude.
Stdio Mode (Claude Desktop)
Run miniapm mcp-config to get the configuration for Claude Desktop.
HTTP Mode
Available tools:
list_errors- List recent errors with filteringerror_details- Get full error details with stack traceslow_routes- Find slowest routes by P95 latencysystem_status- Get system health overview
CLI Commands
Docker Compose
services:
miniapm:
image: ghcr.io/miniapm/miniapm
ports:
- "3000:3000"
volumes:
- miniapm_data:/data
environment:
- RUST_LOG=miniapm=info
restart: unless-stopped
volumes:
miniapm_data:
Architecture
- Single binary (~4MB) - No external dependencies
- SQLite storage - Zero-config, automatic migrations
- Rust/Axum - Fast, memory-efficient
- OTLP/HTTP - Standard OpenTelemetry protocol
Development
# Run with hot reload
# Run tests
# Run with simulator
License
MIT License - see LICENSE for details.