Download the PHP package kislayphp/metrics without Composer
On this page you can find all versions of the php package kislayphp/metrics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kislayphp/metrics
More information about kislayphp/metrics
Files in kislayphp/metrics
Package metrics
Short Description High-performance C++ PHP extension providing comprehensive metrics collection and monitoring for PHP microservices
License Apache-2.0
Homepage https://github.com/KislayPHP/metrics
Informations about the package metrics
KislayPHP Metrics
Application metrics for PHP microservices. Counter, gauge, histogram, and timer types with zero instrumentation overhead. Prometheus-compatible export.
Part of the KislayPHP ecosystem.
โจ What It Does
kislayphp/metrics provides C++-backed metrics primitives for PHP applications. All metric operations use atomic operations โ measuring your code doesn't slow it down.
๐ฆ Installation
Enable in php.ini:
๐ Quick Start
๐ Public API
Note: Counter::get()/Gauge::get() genuinely return float (fixed 2026-08-12 โ previously returned int despite this signature). Collector::timer() (also added 2026-08-12) constructs and returns a real Timer bound to a lazily-created/looked-up Histogram of the same name, same lookup-or-create semantics as counter()/gauge()/histogram().
Known gap: the labels parameter shown above on counter()/gauge()/histogram()/timer() is accepted syntactically but not implemented โ labels are not attached to the exported series. Don't rely on it for cardinality/dimensioning yet.
start() returns void, not a chainable handle โ call start()/stop() on the same Timer instance (there is no separate TimerHandle class). stop() returns the elapsed milliseconds AND records that value into the underlying Histogram automatically.
Legacy aliases: KislayPHP\Metrics\*
๐ Ecosystem
core ยท gateway ยท discovery ยท metrics ยท queue ยท eventbus
๐ License
Full Docs