PHPackages                             cyberclick-os/elastic-apm-agent-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. cyberclick-os/elastic-apm-agent-php

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

cyberclick-os/elastic-apm-agent-php
===================================

Elastic APM agent for PHP

1.2.0(1y ago)03.8k4MITPHPPHP &gt;=5.4

Since Apr 19Pushed 1y agoCompare

[ Source](https://github.com/cyberclick-os/elastic-apm-agent-php)[ Packagist](https://packagist.org/packages/cyberclick-os/elastic-apm-agent-php)[ RSS](/packages/cyberclick-os-elastic-apm-agent-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (22)Used By (4)

 Elastic APM agent for PHP
 [ ![](docs/logo/logo.png) ](#)
===========================================================

[](#----elastic-apm-agent-for-php--------------------)

[![Build Status](https://camo.githubusercontent.com/dd9077ed09e82d19d6933accf47286f49f556d66af3dc3fb63c265d0599ce2e1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7a6f696c6f6d6f72612f656c61737469632d61706d2d6167656e742d7068702f4275696c643f63616368655365636f6e64733d3836343030)](https://github.com/zoilomora/elastic-apm-agent-php/actions?query=workflow%3A%22Build%22)[![Coverage Status](https://camo.githubusercontent.com/f00882507324ac8d15d6bfcce565121d534fbde0c51a6e7bebf10a5ad2973f07/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7a6f696c6f6d6f72612f656c61737469632d61706d2d6167656e742d7068703f63616368655365636f6e64733d3836343030)](https://scrutinizer-ci.com/g/zoilomora/elastic-apm-agent-php/?branch=master)[![Quality Status](https://camo.githubusercontent.com/434e23b0754abf156e4f00bd64c0d1f2e4c4bde0ef83eaea18bf58e3d1ea2863/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f7a6f696c6f6d6f72612f656c61737469632d61706d2d6167656e742d7068703f63616368655365636f6e64733d3836343030)](https://scrutinizer-ci.com/g/zoilomora/elastic-apm-agent-php/?branch=master)[![PHP Version](https://camo.githubusercontent.com/e8252a3bcd354871ef863ecf154a53c7dc4fa6fad68753aac84713c3c3d8e63c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a6f696c6f6d6f72612f656c61737469632d61706d2d6167656e742d7068703f63616368655365636f6e64733d3836343030)](https://packagist.org/packages/zoilomora/elastic-apm-agent-php)[![Latest Version](https://camo.githubusercontent.com/6923a6c0aa58316c8d33e8a06ed2df718786d46ed2a7ed82493f8a7f6285c720/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a6f696c6f6d6f72612f656c61737469632d61706d2d6167656e742d7068703f696e636c7564655f70726572656c65617365732663616368655365636f6e64733d3836343030)](https://github.com/zoilomora/elastic-apm-agent-php/releases)[![License](https://camo.githubusercontent.com/3e0d218effb6204e5d875a5399e81f38c0624216d06f450fb09f08155ee22028/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7a6f696c6f6d6f72612f656c61737469632d61706d2d6167656e742d7068703f63616368655365636f6e64733d3836343030)](https://github.com/zoilomora/elastic-apm-agent-php/blob/master/LICENSE)

This is an Agent written in PHP that implements the [Intake API v2](https://www.elastic.co/guide/en/apm/server/7.8/intake-api.html) scheme to send tracking information to [Elastic APM](https://www.elastic.co/apm).

Why?
----

[](#why)

I couldn't find an [official APM Agent](https://www.elastic.co/guide/en/apm/agent/index.html) for PHP.

I have searched for unofficial options but I have not found any with backwards compatibility of PHP version (&gt;= 5.4). I know [PHP 5.4](https://www.php.net/ChangeLog-5.php#5.4.0) is very old (01 Mar 2012) but today there is still code working even with older versions.

I wanted to make it as easy as possible to develop new services and also to make it possible to help legacy code refactors be easier to accomplish.

I have based myself on the official [API reference of version 7.8.1](https://github.com/elastic/apm-server/tree/ce6c49cecba96b45e0a3c1c64c6a874336416185/docs/spec).

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

[](#installation)

1. Install via [composer](https://getcomposer.org/)

    ```
    composer require zoilomora/elastic-apm-agent-php
    ```

Usage
-----

[](#usage)

You can implement any **Reporter** to suit your communication infrastructure (sync, async, redis, amqp, etc...).

```
