PHPackages                             aptarus/prom-client-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. aptarus/prom-client-php

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

aptarus/prom-client-php
=======================

Prometheus client library for PHP.

11

Since Sep 21Compare

[ Source](https://github.com/aptarus/promClientPhp)[ Packagist](https://packagist.org/packages/aptarus/prom-client-php)[ RSS](/packages/aptarus-prom-client-php/feed)WikiDiscussions Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

promClientPhp
=============

[](#promclientphp)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4ed474189ce06198f473f1554a963c864b0ebbec4efcb54f80f864a8c2de2ec3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f617074617275732f70726f6d2d636c69656e742d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aptarus/prom-client-php)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/da968ba20fcd957cc68d3aaa80ae91ef2ecffd92757765eb3f3f228bb59d92bf/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f617074617275732f70726f6d436c69656e745068702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/aptarus/promClientPhp)[![Coverage Status](https://camo.githubusercontent.com/11bab443185f863fb4f76796b3d6c125596a903a90379312147d7d3bcd167b16/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f617074617275732f70726f6d436c69656e745068702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/aptarus/promClientPhp/code-structure)[![Quality Score](https://camo.githubusercontent.com/5293e37c17ed810099f9247533553d6923d61b339602c5cbaf4d877634580803/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f617074617275732f70726f6d436c69656e745068702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/aptarus/promClientPhp)[![Total Downloads](https://camo.githubusercontent.com/cec05497f6efbc2ed3374e1a5ac9a4b32e33ce6dc29e696b03b116f9ee7d5b27/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f617074617275732f70726f6d2d636c69656e742d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aptarus/promClientPhp)

This library allows users to record and export stats about a program in a way that [Prometheus](https://prometheus.io/) can make use of. Statistics are stored locally in the filesystem using sqlite; no additional service is required to record the statistics.

Note that this is likely only really useful for a PHP site with low usage. Once you get more than a 2 or 3 QPS you're likely looking at needing a different library for this.

Install
-------

[](#install)

Via Composer

```
$ composer require aptarus/promClientPhp
```

Usage
-----

[](#usage)

Add this to `composer.json`:

```
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/aptarus/promClientPhp.git"
        }
    ],
    "require": {
        "php" : "~5.5|~7.0",
        "aptarus/promClientPhp": "dev-master"
    }
}
```

Client:

```
# TODO
```

Endpoint:

```
# TODO
```

Prometheus config:

```
# TODO
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
composer test
```

### Test prerequisites

[](#test-prerequisites)

Need to install the following on Ubuntu for testing to work:

```
sudo apt-get install php-codesniffer phpunit php5-sqlite
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md)for details.

### Contribution notes

[](#contribution-notes)

This package is based on [the PHP league](http://thephpleague.com/)'s [skeleton](https://github.com/thephpleague/skeleton). From time to time it's not a bad idea to try merging in the skeleton project in case there are new bits of the php ecosystem this project might benefit from. To do this just run:

```
git fetch git@github.com:thephpleague/skeleton.git
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Kevin Lyda](https://github.com/lyda)
- [All Contributors](https://github.com/aptarus/promClientPhp/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/714124?v=4)[Kevin Lyda](/maintainers/lyda)[@lyda](https://github.com/lyda)

### Embed Badge

![Health badge](/badges/aptarus-prom-client-php/health.svg)

```
[![Health](https://phpackages.com/badges/aptarus-prom-client-php/health.svg)](https://phpackages.com/packages/aptarus-prom-client-php)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B11.3k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1941.5M273](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M336](/packages/open-telemetry-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
