PHPackages                             xolegator/pinba\_extension - 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. xolegator/pinba\_extension

ActivePhp-ext[Logging &amp; Monitoring](/categories/logging)

xolegator/pinba\_extension
==========================

Pinba PHP extension: collects request and timer metrics and ships them over UDP (protobuf) to Pinba Engine.

v1.8.0(3w ago)011LGPL-2.1-or-laterCPHP &gt;=8.0CI passing

Since Jun 13Pushed 1w agoCompare

[ Source](https://github.com/XOlegator/pinba_extension)[ Packagist](https://packagist.org/packages/xolegator/pinba_extension)[ Docs](https://github.com/XOlegator/pinba_extension)[ RSS](/packages/xolegator-pinba-extension/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)DependenciesVersions (12)Used By (0)

Pinba Extension (Modernization Fork)
====================================

[](#pinba-extension-modernization-fork)

[![CI](https://github.com/XOlegator/pinba_extension/actions/workflows/ci.yml/badge.svg)](https://github.com/XOlegator/pinba_extension/actions/workflows/ci.yml)[![Lint](https://github.com/XOlegator/pinba_extension/actions/workflows/lint.yml/badge.svg)](https://github.com/XOlegator/pinba_extension/actions/workflows/lint.yml)[![codecov](https://camo.githubusercontent.com/8b009ec9eb8987f70d8f947651ea7ca4ebb2bca83797bdd623aa18d1a3063efc/68747470733a2f2f636f6465636f762e696f2f67682f584f6c656761746f722f70696e62615f657874656e73696f6e2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/XOlegator/pinba_extension)[![Release](https://camo.githubusercontent.com/ed55dcd3397f885b29ca88a2fbff5c0bef75d67eb551705ee1b75e3efb8ef7a6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f584f6c656761746f722f70696e62615f657874656e73696f6e)](https://github.com/XOlegator/pinba_extension/releases/latest)[![Packagist](https://camo.githubusercontent.com/9ec742c7e6062c108033c49a167d43ae23385850dc1244eb80d24b3e56e6c936/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f786f6c656761746f722f70696e62615f657874656e73696f6e3f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/xolegator/pinba_extension)[![Copr](https://camo.githubusercontent.com/2ada910216764f899a9a5d7ec0f3280830ece81f72f44bc7e9c8373ea1b13edc/68747470733a2f2f636f70722e6665646f7261696e667261636c6f75642e6f72672f636f7072732f786f6c656761746f722f70696e62612f7061636b6167652f7068702d70696e62612f7374617475735f696d6167652f6c6173745f6275696c642e706e67)](https://copr.fedorainfracloud.org/coprs/xolegator/pinba/)[![PHP](https://camo.githubusercontent.com/00ae03055608d17c23f9f14ba094d1c9c3a67999338526f834708e5da1cab217/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e30253230254532253830253933253230382e352d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://github.com/XOlegator/pinba_extension/blob/master/docs/support-matrix.md)[![License: LGPL-2.1](https://camo.githubusercontent.com/6330b204ed847db7536318e2a4163c128faf0c0ccaa4871b6bf57eaa70ab9a66/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4c47504c2d2d322e312d626c7565)](https://github.com/XOlegator/pinba_extension/blob/master/COPYING)

Pinba Extension is the PHP client extension for the Pinba monitoring stack. It collects timing and request metrics inside PHP, serializes them with protobuf, and sends them over UDP to Pinba Engine.

This repository is an actively maintained fork of the original project:

- Original project: [tony2001/pinba\_extension](https://github.com/tony2001/pinba_extension)
- Active fork: [XOlegator/pinba\_extension](https://github.com/XOlegator/pinba_extension)

Where This Project Fits
-----------------------

[](#where-this-project-fits)

 ```
flowchart LR
    app[PHP application]
    ext[pinba_extension]
    engine[Pinba Engine plugin]
    mysql[(MySQL)]
    pinboard[Pinboard]

    app -->|request shutdown metrics| ext
    ext -->|UDP protobuf packets| engine
    engine --- mysql
    pinboard -->|SQL queries and dashboards| mysql
```

      Loading Short version:

- `pinba_extension` lives inside PHP applications and produces runtime metrics.
- `pinba_engine` receives those metrics over UDP and exposes them through MySQL tables.
- `pinboard` reads aggregated and raw data from MySQL and presents it to users.

Fork Goals
----------

[](#fork-goals)

The purpose of this fork is to take over active development and make the extension usable on modern systems again.

Current development direction:

- support modern PHP versions and current Zend APIs;
- replace obsolete build and test workflows with reproducible automation;
- add CI for build, lint, tests, and packaging;
- add Debian and Launchpad packaging for supported Ubuntu releases;
- automate rebuilds when new supported PHP versions appear;
- preserve wire compatibility with the existing Pinba protocol and ecosystem.

Installation
------------

[](#installation)

### From the PPA (Ubuntu, recommended)

[](#from-the-ppa-ubuntu-recommended)

Prebuilt packages are published to the [`ppa:xolegator/packages`](https://launchpad.net/~xolegator/+archive/ubuntu/packages) Launchpad PPA. The package name is always `php-pinba`, matching the PHP version it is built for.

#### Distro-native PHP (no extra PHP repository)

[](#distro-native-php-no-extra-php-repository)

For the PHP that ships in Ubuntu's own archive — **no `ondrej/php` PPA required**. Install the `pinba` package matching your release's default PHP:

```
sudo add-apt-repository ppa:xolegator/packages
sudo apt-get update
sudo apt-get install php8.3-pinba   # Ubuntu 24.04 (noble) default PHP
# Ubuntu 26.04 (resolute): sudo apt-get install php8.5-pinba
```

Ubuntu 24.04 ships PHP 8.3 and Ubuntu 26.04 ships PHP 8.5 in their base archives, so the matching `php-pinba` installs on a clean system with no third-party PHP repository.

#### Additional PHP versions via ondrej/php

[](#additional-php-versions-via-ondrejphp)

To install pinba for a PHP version that is **not** your release's default, first add the [`ppa:ondrej/php`](https://launchpad.net/~ondrej/+archive/ubuntu/php) PPA (the wide PHP-version repository) so the matching `php` runtime is available:

```
sudo add-apt-repository ppa:ondrej/php
sudo add-apt-repository ppa:xolegator/packages
sudo apt-get update
sudo apt-get install php8.4-pinba   # also available on 24.04: php8.2-pinba, php8.5-pinba
```

Availability per Ubuntu release: 24.04 `noble` offers `php8.2`–`php8.5` (8.3 from the base archive, the rest via `ondrej/php`); 26.04 `resolute` offers only `php8.5` (its base PHP — `ondrej/php` has no `resolute` series).

The package installs the extension and enables it (`phpenmod`). Set the runtime options in a drop-in such as `/etc/php//mods-available/pinba.ini` (or a separate `conf.d` file), then reload the SAPI:

```
pinba.enabled = 1
pinba.server  = 127.0.0.1:30002
```

```
sudo systemctl restart php8.5-fpm   # for FPM; CLI picks the new config up automatically
```

### On Fedora and Enterprise Linux

[](#on-fedora-and-enterprise-linux)

There are two ways to get the extension, depending on whether you use your distribution's own PHP or a specific parallel-installable PHP version.

#### Distro-native PHP — Copr (`php-pinba`, no Remi)

[](#distro-native-php--copr-php-pinba-no-remi)

For the PHP that ships in your distribution's own repositories, prebuilt packages are published to the [`xolegator/pinba`](https://copr.fedorainfracloud.org/coprs/xolegator/pinba/) Copr repository for Fedora and Enterprise Linux 9/10 (AlmaLinux, Rocky, RHEL, CentOS Stream) — **Remi is not required**:

```
sudo dnf copr enable xolegator/pinba
sudo dnf install php-pinba
```

This builds for the OS's default PHP (Fedora 43 → 8.4, Fedora 44 → 8.5, Enterprise Linux 9 → 8.0, Enterprise Linux 10 → 8.3) and ships its ini at `/etc/php.d/40-pinba.ini`. On AlmaLinux/RHEL 9 the default `dnf install php` is the non-modular PHP 8.0 — you don't need to enable any module stream. Although PHP 8.0 is past upstream end-of-life, Enterprise Linux backports security fixes to it for the life of the OS, so this fork supports it there too (minimum supported PHP is **8.0**).

#### Specific / parallel PHP versions — Remi

[](#specific--parallel-php-versions--remi)

For a specific PHP version, or to run several PHP versions side by side, use [Remi's repository](https://rpms.remirepo.net/). Remi packages **this fork** for its module and Software Collection streams (PHP 8.2+), so those builds always track the current extension — [status page](https://blog.remirepo.net/pages/PECL-extensions-RPM-status). Enable Remi and install `php-pinba` from the module stream, or `php-php-pinba` from the matching Software Collection, e.g. `dnf install php84-php-pinba`. Follow the [Remi configuration wizard](https://rpms.remirepo.net/wizard/) for the exact commands for your OS and PHP version.

#### Runtime options

[](#runtime-options)

Set the runtime options in the ini file shipped by whichever package you installed:

```
pinba.enabled = 1
pinba.server  = 127.0.0.1:30002
```

### From source

[](#from-source)

```
phpize
./configure --enable-pinba
make -j"$(nproc)"
sudo make install
```

This requires the matching `php-dev` and `libprotobuf-c-dev` packages. See [docs/build.md](docs/build.md) for the full local build and test flow.

### Docker and other distributions

[](#docker-and-other-distributions)

Outside Debian/Ubuntu the extension is built from source against the system protobuf-c runtime. Install the build toolchain and the protobuf-c development headers for your platform:

- Debian / Ubuntu: `libprotobuf-c-dev`
- Fedora / RHEL: `protobuf-c-devel`
- Alpine: `protobuf-c-dev`

**Docker (official PHP images)** — build and enable the extension in your image:

```
FROM php:8.5-fpm

RUN apt-get update \
 && apt-get install -y --no-install-recommends $PHPIZE_DEPS git libprotobuf-c-dev \
 && git clone --depth 1 https://github.com/XOlegator/pinba_extension.git /usr/src/pinba \
 && cd /usr/src/pinba \
 && phpize && ./configure --enable-pinba && make -j"$(nproc)" && make install \
 && docker-php-ext-enable pinba \
 && rm -rf /usr/src/pinba /var/lib/apt/lists/*

RUN printf "pinba.enabled=1\npinba.server=pinba-engine:30002\n" \
      > "$PHP_INI_DIR/conf.d/zz-pinba.ini"
```

`$PHPIZE_DEPS` and `$PHP_INI_DIR` are provided by the official `php` images. For a slimmer image you may `apt-get purge $PHPIZE_DEPS` afterwards, but keep the runtime `libprotobuf-c1`.

**PIE (PHP Installer for Extensions)** — this repository ships [PIE](https://github.com/php/pie)metadata (`composer.json` with `"type": "php-ext"`) and is published to [Packagist](https://packagist.org/packages/xolegator/pinba_extension), so the extension can be installed cross-platform with:

```
pie install xolegator/pinba_extension
```

PIE still compiles from source, so it needs the same build toolchain and `libprotobuf-c` headers as a manual source build.

Development Baseline
--------------------

[](#development-baseline)

The active CI matrix builds the extension and runs the PHPT suite on `PHP 8.2`, `8.3`, `8.4`, and `8.5`, and enforces workflow, shell, and markdown linting plus `clang-format` and `clang-tidy` in GitHub Actions. The PHP matrix source of truth is `.github/php-versions.json`, and scheduled discovery automation refreshes it through PRs. Build-from-source steps are covered under [Installation](#from-source) and [docs/build.md](docs/build.md).

Documentation
-------------

[](#documentation)

- Development workflow and branch/commit rules: [docs/development.md](docs/development.md)
- Local build and test workflow: [docs/build.md](docs/build.md)
- Packaging direction and package naming: [docs/packaging.md](docs/packaging.md)
- Supported platforms and lifecycle policy: [docs/support-matrix.md](docs/support-matrix.md)
- Release process and automatic changelog flow: [docs/releasing.md](docs/releasing.md)
- Historical legacy release notes (curated): [docs/legacy-news.md](docs/legacy-news.md)
- Verbatim upstream `NEWS` archive: [docs/legacy-upstream-news.md](docs/legacy-upstream-news.md)
- Contribution guide: [CONTRIBUTING.md](CONTRIBUTING.md)
- Security policy: [SECURITY.md](SECURITY.md)
- Support policy: [SUPPORT.md](SUPPORT.md)
- Shared Pinba knowledge base: [XOlegator/pinba\_engine/knowledge](https://github.com/XOlegator/pinba_engine/tree/master/knowledge)

Release Process
---------------

[](#release-process)

This fork uses a semi-automated GitHub release flow:

- regular work is merged to `master` through Pull Requests;
- PR titles and commits must follow Conventional Commits;
- accepted changes are accumulated into `CHANGELOG.md` automatically;
- release PRs, version bumps, tags, and GitHub Releases are managed by automation.

Historical upstream notes remain in `docs/legacy-news.md` and `docs/legacy-upstream-news.md`; all new fork release history belongs in `CHANGELOG.md`.

License
-------

[](#license)

This fork inherits the original project license and remains available under the [GNU Lesser General Public License v2.1 or later](LICENSE).

Copyright:

- 2009-2013 Antony Dovgal
- 2026-present Oleg Ekhlakov

Provenance and third-party dependency notices are documented in [NOTICE](NOTICE), and project authorship in [AUTHORS](AUTHORS).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance97

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 56.5% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~2 days

Total

8

Last Release

25d ago

PHP version history (2 changes)v1.3.0PHP &gt;=8.2

v1.8.0PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2227351?v=4)[Oleg Ekhlakov](/maintainers/XOlegator)[@XOlegator](https://github.com/XOlegator)

---

Top Contributors

[![tony2001](https://avatars.githubusercontent.com/u/42386?v=4)](https://github.com/tony2001 "tony2001 (134 commits)")[![XOlegator](https://avatars.githubusercontent.com/u/2227351?v=4)](https://github.com/XOlegator "XOlegator (72 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (15 commits)")[![anton-povarov](https://avatars.githubusercontent.com/u/4687144?v=4)](https://github.com/anton-povarov "anton-povarov (6 commits)")[![Sannis](https://avatars.githubusercontent.com/u/77367?v=4)](https://github.com/Sannis "Sannis (4 commits)")[![octo](https://avatars.githubusercontent.com/u/116087?v=4)](https://github.com/octo "octo (4 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (1 commits)")[![aparkhomenko](https://avatars.githubusercontent.com/u/7422485?v=4)](https://github.com/aparkhomenko "aparkhomenko (1 commits)")

---

Tags

monitoringprofilingMetricsprotobufextensionpinba

### Embed Badge

![Health badge](/badges/xolegator-pinba-extension/health.svg)

```
[![Health](https://phpackages.com/badges/xolegator-pinba-extension/health.svg)](https://phpackages.com/packages/xolegator-pinba-extension)
```

###  Alternatives

[slickdeals/statsd

a PHP client for statsd

274.9M13](/packages/slickdeals-statsd)[krenor/prometheus-client

A PHP Client for Prometheus

1021.6k](/packages/krenor-prometheus-client)

PHPackages © 2026

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