PHPackages                             instrumental/instrumental\_agent - 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. instrumental/instrumental\_agent

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

instrumental/instrumental\_agent
================================

This agent supports Instrumental custom metric monitoring for PHP applications. It provides high-data reliability at high scale.

v1.0.2(8y ago)816.5k1[2 issues](https://github.com/Instrumental/instrumental_agent-php/issues)MITPHPPHP &gt;=7

Since Apr 29Pushed 8y ago8 watchersCompare

[ Source](https://github.com/Instrumental/instrumental_agent-php)[ Packagist](https://packagist.org/packages/instrumental/instrumental_agent)[ RSS](/packages/instrumental-instrumental-agent/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (14)Used By (0)

Instrumental PHP Agent
======================

[](#instrumental-php-agent)

Instrumental is a [application monitoring platform](https://instrumentalapp.com) built for developers who want a better understanding of their production software. Powerful tools, like the [Instrumental Query Language](https://instrumentalapp.com/docs/query-language), combined with an exploration-focused interface allow you to get real answers to complex questions, in real-time.

This agent supports custom metric monitoring for PHP applications. It provides high-data reliability at high scale.

Composer Installation
---------------------

[](#composer-installation)

```
composer require instrumental/instrumental_agent
```

Visit [instrumentalapp.com](https://instrumentalapp.com) and create an account, then initialize the agent with your API key, found in the Docs section.

Usage
-----

[](#usage)

```
$I = new \Instrumental\Agent();
$I->setApiKey("PROJECT_API_TOKEN");
$I->setEnabled($isProduction); // only send metrics in production
```

You'll probably want something like the above, using your [project API token](https://instrumentalapp.com/docs/tokens), only enabling the agent in production mode so you don't have development and production data writing to the same value. Or you can setup two projects, so that you can verify stats in one, and release them to production in another.

Now you can begin to use Instrumental to track your application.

```
$I->gauge('load', 1.23);                                # value at a point in time

$I->increment('signups');                               # increasing value, think "events"

$post = $I->time('query_time', function(){              # time a block of code
  return Post->find(1);
});
$post = $I->time_ms('query_time_in_ms', function(){     # prefer milliseconds?
  return Post->find(1);
});
```

**Note**: If it is unable to connect to the service, it will discard data after reaching a low memory threshold.

Want to track an event (like an application deploy, or downtime)? You can capture events that are instantaneous, or events that happen over a period of time.

```
$I->notice('Jeffy deployed rev ef3d6a'); # instantaneous event
$I->notice('Testing socket buffer increase', time() - (3*24*60*60), 20*60); # an event (three days ago) with a duration (20 minutes)
```

Agent Control
-------------

[](#agent-control)

Need to quickly disable the agent? Use `$I->setEnabled(FALSE);` on initialization and you don't need to change any application code.

Symfony
-------

[](#symfony)

For usage with Symfony applications, we recommend registering the [agent as a Symfony service](examples/symfony/README.md).

Troubleshooting &amp; Help
--------------------------

[](#troubleshooting--help)

We are here to help. Email us at .

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

[](#release-process)

1. Pull latest master
2. Merge feature branch(es) into master
3. `script/test`
4. Increment version in code

- `lib/Agent.php`

5. Update [CHANGELOG.md](CHANGELOG.md)
6. Commit "Release version vX.Y.Z"
7. Push to GitHub
8. Tag version: `git tag 'vX.Y.Z' && git push --tags` (GitHub webhook will tell packagist and release a new version)
9. Verify update on [https://packagist.org/packages/instrumental/instrumental\_agent](https://packagist.org/packages/instrumental/instrumental_agent)
10. Refresh documentation on instrumentalapp.com

Version Policy
--------------

[](#version-policy)

This library follows [Semantic Versioning 2.0.0](http://semver.org).

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 81.4% 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 ~78 days

Recently: every ~175 days

Total

10

Last Release

3007d ago

Major Versions

v0.0.7 → v1.0.02016-05-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/d78b3816e0fd057e9c27fd792516d007b787244323cb08ce88105eccb439d4cc?d=identicon)[jasongladish](/maintainers/jasongladish)

![](https://avatars.githubusercontent.com/u/1167916?v=4)[Matthew Gordon](/maintainers/esquivalient)[@esquivalient](https://github.com/esquivalient)

![](https://www.gravatar.com/avatar/8f4fd15b6ff32cc4546401050cc87fd08a08ef0e11f047cc65e2e27182f929c4?d=identicon)[mediocretes](/maintainers/mediocretes)

---

Top Contributors

[![jason-o-matic](https://avatars.githubusercontent.com/u/13733?v=4)](https://github.com/jason-o-matic "jason-o-matic (79 commits)")[![esquivalient](https://avatars.githubusercontent.com/u/1167916?v=4)](https://github.com/esquivalient "esquivalient (10 commits)")[![JamesPaden](https://avatars.githubusercontent.com/u/297533?v=4)](https://github.com/JamesPaden "JamesPaden (4 commits)")[![mediocretes](https://avatars.githubusercontent.com/u/149895?v=4)](https://github.com/mediocretes "mediocretes (4 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/instrumental-instrumental-agent/health.svg)

```
[![Health](https://phpackages.com/badges/instrumental-instrumental-agent/health.svg)](https://phpackages.com/packages/instrumental-instrumental-agent)
```

###  Alternatives

[symfony/monolog-bridge

Provides integration for Monolog with various Symfony components

2.6k198.8M328](/packages/symfony-monolog-bridge)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[spatie/flare-client-php

Send PHP errors to Flare

177156.9M21](/packages/spatie-flare-client-php)[illuminate/log

The Illuminate Log package.

6225.0M603](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[grkamil/laravel-telegram-logging

Send logs to Telegram chat via Telegram bot

161493.0k](/packages/grkamil-laravel-telegram-logging)

PHPackages © 2026

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