PHPackages                             myschoolmanagement/elastic-apm-symfony-bundle - 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. myschoolmanagement/elastic-apm-symfony-bundle

ActiveSymfony-bundle[Logging &amp; Monitoring](/categories/logging)

myschoolmanagement/elastic-apm-symfony-bundle
=============================================

Integrate Elastic APM into Symfony

1.0.6(2y ago)14290.2k—0.4%15[2 PRs](https://github.com/MySchoolManagement/elastic-apm-symfony-bundle/pulls)MITPHPPHP ^7.1|^8.0

Since Mar 24Pushed 2y ago4 watchersCompare

[ Source](https://github.com/MySchoolManagement/elastic-apm-symfony-bundle)[ Packagist](https://packagist.org/packages/myschoolmanagement/elastic-apm-symfony-bundle)[ Docs](https://github.com/MySchoolManagement/elastic-apm-symfony-bundle)[ RSS](/packages/myschoolmanagement-elastic-apm-symfony-bundle/feed)WikiDiscussions master Synced 1mo ago

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

Elastic APM Symfony Bundle
==========================

[](#elastic-apm-symfony-bundle)

[![Latest Version](https://camo.githubusercontent.com/aa6e6236ded86cdc6bee025b9f3927f406381c47704c6f4c81aadc23dc1a14b9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4d795363686f6f6c4d616e6167656d656e742f656c61737469632d61706d2d73796d666f6e792d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://github.com/myschoolmanagement/elastic-apm-symfony-bundle/releases)[![Total Downloads](https://camo.githubusercontent.com/e03e3fb17387aa28031018c5fbeb3cbfcfbdfb9a97fb24683a2fe3808004e812/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d797363686f6f6c6d616e6167656d656e742f656c61737469632d61706d2d73796d666f6e792d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/myschoolmanagement/elastic-apm-symfony-bundle)

This bundle integrates the Elastic APM PHP API into Symfony. For more information about Elastic APM, please visit . This bundle adds a lot more essentials. Here's a quick list:

1. **Better transaction naming strategy**: Your transaction traces can be named accurately by route names, the controller name, the request URI or you can decide on a custom naming strategy via a seamless interface that uses any naming convention you deem fit. While running console commands, it also sets the transaction name as the command name.
2. **Console Commands Enhancements**: While running console commands, its sets the options and arguments passed via the CLI as custom parameters to the transaction trace for easier debugging.
3. **Exception Listening**: It also captures all Symfony exceptions in web requests and console commands and sends them to Elastic APM.
4. **Interactor Service**: It provides access to most of the Elastic APM API via a Service class `ElasticApmInteractorInterface::class`. This can be injected it into any class, controller, service to communicate with APM. If the `adaptive` interactive is used then any APM calls will be ignored when the extension isn't loaded (for example in development environments).

    ```
    $this->apm->addLabel('name', 'john');
    ```
5. **Logging Support**: In development, you are unlikely to have Elastic APM setup. There's a configuration to enable logging which outputs all actions to your Symfony log, hence emulating what it would actually do in production.

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

[](#installation)

### Step 0 : Install Elastic APM

[](#step-0--install-elastic-apm)

Follow .

### Step 1: Add dependency

[](#step-1-add-dependency)

```
$ composer require myschoolmanagement/elastic-apm-symfony-bundle
```

### Step 2: Register the bundle

[](#step-2-register-the-bundle)

Then register the bundle with your kernel:

```
