PHPackages                             log-engine/logengine-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. log-engine/logengine-php

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

log-engine/logengine-php
========================

Inspector monitoring for PHP applications.

3.17.1(1mo ago)3457313MITPHPPHP ^8.1CI passing

Since Apr 2Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/inspector-apm/inspector-php)[ Packagist](https://packagist.org/packages/log-engine/logengine-php)[ RSS](/packages/log-engine-logengine-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (12)Versions (223)Used By (0)

Inspector | Code Execution Monitoring Tool
==========================================

[](#inspector--code-execution-monitoring-tool)

[![Total Downloads](https://camo.githubusercontent.com/755103e7d48fc8dd969b7bde36eadf29a1720c79595df122e1e890d084e4f32c/68747470733a2f2f706f7365722e707567782e6f72672f696e73706563746f722d61706d2f696e73706563746f722d7068702f646f776e6c6f616473)](//packagist.org/packages/inspector-apm/inspector-php)[![Latest Stable Version](https://camo.githubusercontent.com/8e07ea2aa188f0f7a017efedb0231d77063c32002cc8379db31c3bf0881ba51f/68747470733a2f2f706f7365722e707567782e6f72672f696e73706563746f722d61706d2f696e73706563746f722d7068702f762f737461626c65)](https://packagist.org/packages/inspector-apm/inspector-php)[![License](https://camo.githubusercontent.com/6396331d82f82efb1a1447f051b9251d3ca02c5ad0496b7d72e3e6e0de9aee3a/68747470733a2f2f706f7365722e707567782e6f72672f696e73706563746f722d61706d2f696e73706563746f722d7068702f6c6963656e7365)](//packagist.org/packages/inspector-apm/inspector-php)

> Before moving on, please consider giving us a GitHub star ⭐️. Thank you!

Code Execution Monitoring, built for PHP developers.

Requirements
------------

[](#requirements)

- PHP &gt;= ^8.1

Install
-------

[](#install)

Install the latest version by:

```
composer require inspector-apm/inspector-php
```

Use
---

[](#use)

To start sending data to Inspector you need an Ingestion Key to create an instance of the `Configuration` class. You can obtain `INSPECTOR_API_KEY` creating a new project in your [Inspector](https://www.inspector.dev) dashboard.

```
use Inspector\Inspector;
use Inspector\Configuration;

$configuration = new Configuration('YOUR_INGESTION_KEY');
$inspector = new Inspector($configuration);
```

All start with a `transaction`. Transaction represents an execution cycle, and it can contain one or hundred of segments:

```
// Start an execution cycle with a transaction
$inspector->startTransaction($_SERVER['PATH_INFO']);
```

Use `addSegment` method to monitor a code block in your transaction:

```
$result = $inspector->addSegment(function ($segment) {
    // Do something here...
	return "Hello World!";
}, 'my-process');

echo $result; // this will print "Hello World!"
```

Inspector will monitor your code execution in real time alerting you if something goes wrong.

Custom Transport
----------------

[](#custom-transport)

You can also set up a custom transport class to transfer monitoring data from your server to Inspector in a personalized way.

The transport class needs to implement `\Inspector\Transports\TransportInterface`:

```
class CustomTransport implements \Inspector\Transports\TransportInterface
{
    protected $configuration;

    protected $queue = [];

    public function __constructor($configuration)
    {
        $this->configuration = $configuration;
    }

    public function addEntry(\Inspector\Models\Model $entry)
    {
        // Add an \Inspector\Models\Model entry in the queue.
        $this->queue[] = $entry;
    }

    public function flush()
    {
        // Performs data transfer.
        $handle = curl_init('https://ingest.inspector.dev');
        curl_setopt($handle, CURLOPT_POST, 1);
        curl_setopt($handle, CURLOPT_HTTPHEADER, [
            'X-Inspector-Key: xxxxxxxxxxxx',
            'Content-Type: application/json',
            'Accept: application/json',
        ]);
        curl_setopt($handle, CURLOPT_POSTFIELDS, json_encode($this->queue));
        curl_exec($handle);
        curl_close($handle);
    }
}
```

Then you can set the new transport in the `Inspector` instance using a callback that will receive the current configuration state as parameter.

```
$inspector->setTransport(function (\Inspector\Configuration $configuration) {
    return new CustomTransport($configuration);
});
```

**[Chek out the official documentation](https://docs.inspector.dev/php)**

Agentic Integration
-------------------

[](#agentic-integration)

You can connect the Inspector library documentation to your coding assistant as a Model Context Protocol (MCP) server.

It makes it easy for tools like Claude Code, Cursor, and VS Code extensions reliably understand what Inspector client library can do, its configurations, how to use it.

[AI Assisted Integration](https://docs.inspector.dev/concepts/agentic-integration)

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

[](#contributing)

We encourage you to contribute to Inspector! Please check out the [Contribution Guidelines](CONTRIBUTING.md) about how to proceed. Join us!

LICENSE
-------

[](#license)

This package is licensed under the [MIT](LICENSE) license.

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance88

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 95% 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 ~11 days

Total

219

Last Release

35d ago

Major Versions

1.x-dev → 2.0.02019-05-29

2.4.8 → 3.0.02019-12-09

PHP version history (3 changes)1.0.0PHP &gt;=7.0.0

3.1.4PHP &gt;=7.2

3.15.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/320345fbe48c7cff2b3a25992c8207e959ae7817fb2fb97bb176dc6e559aacf5?d=identicon)[valerione](/maintainers/valerione)

---

Top Contributors

[![ilvalerione](https://avatars.githubusercontent.com/u/13559278?v=4)](https://github.com/ilvalerione "ilvalerione (551 commits)")[![oliverquynh](https://avatars.githubusercontent.com/u/16967350?v=4)](https://github.com/oliverquynh "oliverquynh (10 commits)")[![trippo](https://avatars.githubusercontent.com/u/497169?v=4)](https://github.com/trippo "trippo (10 commits)")[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (3 commits)")[![bchalier](https://avatars.githubusercontent.com/u/17746418?v=4)](https://github.com/bchalier "bchalier (2 commits)")[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (2 commits)")[![chumanfu](https://avatars.githubusercontent.com/u/2536603?v=4)](https://github.com/chumanfu "chumanfu (2 commits)")

---

Tags

error-handlingerror-monitoringerror-reportinginspectormonitoringmonitoring-toolphpphpmonitoringinspectortelemetryobservability

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/log-engine-logengine-php/health.svg)

```
[![Health](https://phpackages.com/badges/log-engine-logengine-php/health.svg)](https://phpackages.com/packages/log-engine-logengine-php)
```

###  Alternatives

[inspector-apm/inspector-php

Inspector monitoring for PHP applications.

342.4M15](/packages/inspector-apm-inspector-php)[inspector-apm/inspector-symfony

Code Execution Monitoring for Symfony applications.

2830.1k2](/packages/inspector-apm-inspector-symfony)

PHPackages © 2026

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