Download the PHP package inspector-apm/inspector-php without Composer
On this page you can find all versions of the php package inspector-apm/inspector-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download inspector-apm/inspector-php
More information about inspector-apm/inspector-php
Files in inspector-apm/inspector-php
Package inspector-php
Short Description Inspector monitoring for PHP applications.
License MIT
Informations about the package inspector-php
Inspector | Code Execution Monitoring Tool
Before moving on, please consider giving us a GitHub star ⭐️. Thank you!
Code Execution Monitoring, built for PHP developers.
Requirements
- PHP >= ^8.1
Install
Install the latest version by:
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 dashboard.
All start with a transaction. Transaction represents an execution cycle, and it can contain one or hundred of segments:
Use addSegment method to monitor a code block in your transaction:
Inspector will monitor your code execution in real time alerting you if something goes wrong.
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:
Then you can set the new transport in the Inspector instance
using a callback that will receive the current configuration state as parameter.
Concurrent & Async Tasks
When monitoring concurrent or async tasks (e.g. using Fibers, ReactPHP, Amp, or pcntl_fork), a single
segment stack would produce incorrect parent-child relationships because tasks interleave on the shared stack.
Use fork() to create an independent Scope for each concurrent task:
Each Scope has its own segment stack, so interleaving tasks never corrupt the parent-child hierarchy.
Scopes also support addSegment(), fork() (for nested forking), and getOpenSegments().
Chek out the official documentation
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.
Contributing
We encourage you to contribute to Inspector! Please check out the Contribution Guidelines about how to proceed. Join us!
LICENSE
This package is licensed under the MIT license.