PHPackages                             clivern/observability-php-sdk - 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. [Search &amp; Filtering](/categories/search)
4. /
5. clivern/observability-php-sdk

ActiveLibrary[Search &amp; Filtering](/categories/search)

clivern/observability-php-sdk
=============================

Observability SDK for PHP Applications.

2.0.8(4y ago)611[1 issues](https://github.com/Clivern/observability-php-sdk/issues)[2 PRs](https://github.com/Clivern/observability-php-sdk/pulls)MITPHPPHP &gt;=7.0CI failing

Since Feb 9Pushed 2w ago2 watchersCompare

[ Source](https://github.com/Clivern/observability-php-sdk)[ Packagist](https://packagist.org/packages/clivern/observability-php-sdk)[ Docs](https://github.com/clivern/observability-php-sdk)[ GitHub Sponsors](https://github.com/clivern)[ RSS](/packages/clivern-observability-php-sdk/feed)WikiDiscussions 2.x Synced 6d ago

READMEChangelog (8)Dependencies (3)Versions (13)Used By (0)

 [![observability-php-sdk logo](/assets/img/logo5.png?v=2.0.8)](/assets/img/logo5.png?v=2.0.8)

### Observability SDK

[](#observability-sdk)

Observability SDK for PHP Applications

 [ ![](https://github.com/Clivern/observability-php-sdk/actions/workflows/php.yml/badge.svg) ](https://github.com/Clivern/observability-php-sdk/actions/workflows/php.yml) [ ![](https://camo.githubusercontent.com/effaac1f8a2635b735ea30427b76f9a24695ff752bd73a1c794a1cf3d695a03b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f56657273696f6e2d322e302e382d7265642e737667) ](https://packagist.org/packages/clivern/observability-php-sdk) [ ![](https://camo.githubusercontent.com/128887c51de1fa9a4ddc82f3643a3a773f1ad69e88f9ed68ffe4ddcc8667cc6a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c4943454e53452d4d49542d6f72616e67652e737667) ](https://github.com/Clivern/observability-php-sdk/blob/master/LICENSE)

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

[](#documentation)

### Installation:

[](#installation)

To install the package via `composer`, use the following:

```
$ composer require clivern/observability-php-sdk
```

This command requires you to have `composer` installed globally.

### Graphite Reporter:

[](#graphite-reporter)

```
use Clivern\Observability\Aggregation\MemcachedAggregate;
use Clivern\Observability\Aggregation\Client\MemcachedClient;
use Clivern\Observability\Reporter\GraphiteClient;

$metricsReporter = new MemcachedAggregate(
    new GraphiteClient('localhost', 2003),
    new MemcachedClient('127.0.0.1', 11211),
    []
);

$metricsReporter->report([
    [
        'key' => 'orders_service.metrics.total_http_calls',
        'value' => 1,
        'time' => time(),
        'aggregateFunc' => MemcachedAggregate::SUM_AGGREGATE_FUNCTION
    ]
]);
```

For `PHP` runtime statistics, You can use this class `Clivern\Observability\Stats\Runtime`.

To measure the execution time:

```
use Clivern\Observability\Stats\Execution;

$execution = new Execution();
$execution->start();

// Code that takes time!
sleep(2);

$execution->end();

var_dump($execution->getTimeInSeconds()); // float
var_dump($execution->getTimeInMinutes()); // float
```

To measure latency of an HTTP call or application latency.

```
use Clivern\Observability\Aggregation\MemcachedAggregate;
use Clivern\Observability\Aggregation\Client\MemcachedClient;
use Clivern\Observability\Reporter\GraphiteClient;

$metricsReporter = new MemcachedAggregate(
    new GraphiteClient('localhost', 2003),
    new MemcachedClient('127.0.0.1', 11211),
    []
);

$execution = new Execution();
$execution->start();

// Code that takes time!
sleep(2);

$execution->end();

$metricsReporter->report([
    [
        'key' => 'orders_service.metrics.http_request_latency',
        'value' => $execution->getTimeInSeconds(),
        'time' => time(),
        'aggregateFunc' => MemcachedAggregate::AVG_AGGREGATE_FUNCTION
    ]
]);
```

### Elasticsearch Reporter:

[](#elasticsearch-reporter)

```
#
```

Versioning
----------

[](#versioning)

For transparency into our release cycle and in striving to maintain backward compatibility, observability-php-sdk is maintained under the [Semantic Versioning guidelines](https://semver.org/) and release process is predictable and business-friendly.

See the [Releases section of our GitHub project](https://github.com/clivern/observability-php-sdk/releases) for changelogs for each release version of observability-php-sdk. It contains summaries of the most noteworthy changes made in each release.

Bug tracker
-----------

[](#bug-tracker)

If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at

Security Issues
---------------

[](#security-issues)

If you discover a security vulnerability within observability-php-sdk, please send an email to

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

[](#contributing)

We are an open source, community-driven project so please feel free to join us. see the [contributing guidelines](CONTRIBUTING.md) for more details.

License
-------

[](#license)

© 2020, clivern. Released under [MIT License](https://opensource.org/licenses/mit-license.php).

**observability-php-sdk** is authored and maintained by [@clivern](http://github.com/clivern).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance59

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.9% 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 ~176 days

Recently: every ~227 days

Total

9

Last Release

878d ago

Major Versions

0.0.1 → 2.0.12021-06-24

### Community

Maintainers

![](https://www.gravatar.com/avatar/6972371682cd4255285c19cb35f05151468506019b13374b14f305f5926107d6?d=identicon)[clivern](/maintainers/clivern)

---

Top Contributors

[![Clivern](https://avatars.githubusercontent.com/u/1634427?v=4)](https://github.com/Clivern "Clivern (51 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (6 commits)")[![stack-file[bot]](https://avatars.githubusercontent.com/in/408123?v=4)](https://github.com/stack-file[bot] "stack-file[bot] (1 commits)")

---

Tags

elasticsearchgrafanagraphitelaravelmetricsmetrics-gatheringobservabilitysymfonyobservabilityclivern

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/clivern-observability-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/clivern-observability-php-sdk/health.svg)](https://phpackages.com/packages/clivern-observability-php-sdk)
```

###  Alternatives

[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M65](/packages/opensearch-project-opensearch-php)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[massive/search-bundle

Massive Search Bundle

721.4M13](/packages/massive-search-bundle)[shyim/opensearch-php-dsl

OpenSearch/Elasticsearch DSL library

175.9M9](/packages/shyim-opensearch-php-dsl)[outl1ne/nova-multiselect-filter

Multiselect filter for Laravel Nova.

45802.7k3](/packages/outl1ne-nova-multiselect-filter)

PHPackages © 2026

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