PHPackages                             perfbase/symfony - 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. perfbase/symfony

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

perfbase/symfony
================

Symfony integration for the Perfbase profiling tool.

v1.1.0(4w ago)13↓100%Apache-2.0PHPPHP &gt;=7.4 &lt;8.6CI passing

Since Apr 8Pushed 4w agoCompare

[ Source](https://github.com/perfbaseorg/symfony)[ Packagist](https://packagist.org/packages/perfbase/symfony)[ Docs](https://github.com/perfbaseorg/symfony)[ RSS](/packages/perfbase-symfony/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (12)Versions (6)Used By (0)

 [ ![Perfbase](https://camo.githubusercontent.com/a4e071fd1246cf5c68819015801139400d74b208b76a07ba8c5945d6e4ffd3ba/68747470733a2f2f63646e2e70657266626173652e636f6d2f696d672f6c6f676f2d66756c6c2e737667) ](https://perfbase.com)

### Perfbase for Symfony

[](#perfbase-for-symfony)

 Symfony integration for [Perfbase](https://perfbase.com).

 [![Packagist Version](https://camo.githubusercontent.com/d989a02da49e193c4edcd83dcebaf67ede4e5f5a0ff820895e04228bf1ab8d56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70657266626173652f73796d666f6e79)](https://packagist.org/packages/perfbase/symfony) [![License](https://camo.githubusercontent.com/c8dea08fbcde1f204faae1e7475bc4531e3ba3fe9e1159ea4e646e9250ab0119/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f70657266626173652f73796d666f6e79)](https://github.com/perfbaseorg/symfony/blob/main/LICENSE.txt) [![CI](https://camo.githubusercontent.com/f058908ef49eecc71622d337629c71573e33c2ece2602c8dec4c1e76a1ba15df/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70657266626173656f72672f73796d666f6e792f63692e796d6c3f6272616e63683d6d61696e)](https://github.com/perfbaseorg/symfony/actions/workflows/ci.yml) [![PHP Version](https://camo.githubusercontent.com/0a13c39b085090ae313b08bc2ba7bfab277d089dbe0407774e2f24adcabe6c58/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e342d2d382e352d626c7565)](https://camo.githubusercontent.com/0a13c39b085090ae313b08bc2ba7bfab277d089dbe0407774e2f24adcabe6c58/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e342d2d382e352d626c7565) [![Symfony Version](https://camo.githubusercontent.com/f1b677abc57d245b92efd4e79892ffd5f4e4ca85518481657848faf374307305/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d352e342d2d372e782d626c7565)](https://camo.githubusercontent.com/f1b677abc57d245b92efd4e79892ffd5f4e4ca85518481657848faf374307305/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d352e342d2d372e782d626c7565)

`perfbase/symfony` is the official Symfony bundle for Perfbase.

It integrates Symfony request and console lifecycles with the Perfbase PHP SDK and native extension so traces are captured and submitted with minimal application code.

Current production scope:

- HTTP request profiling
- Console command profiling
- Configurable sampling
- Include and exclude filters for HTTP and console contexts
- Fail-open runtime behavior when profiling cannot start safely

Out of scope in the current release:

- Messenger worker profiling
- Scheduler-specific instrumentation beyond normal console commands
- Symfony Web Profiler toolbar integration
- an auto-published Symfony Flex recipe

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

[](#requirements)

- PHP `7.4` to `8.5`
- Symfony `5.4` to `7.x`
- [`perfbase/php-sdk`](https://packagist.org/packages/perfbase/php-sdk) `^1.0`
- The Perfbase native PHP extension installed and enabled

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

[](#installation)

Install the bundle:

```
composer require perfbase/symfony
```

Install the Perfbase PHP extension if it is not already available:

```
bash -c "$(curl -fsSL https://cdn.perfbase.com/install.sh)"
```

Restart PHP-FPM, Apache, RoadRunner, Swoole, or any other long-lived PHP runtime after installing the extension.

Bundle Registration
-------------------

[](#bundle-registration)

If your application uses Symfony Flex and a published Perfbase recipe is available in your environment, bundle registration can be automated.

If not, register the bundle manually in `config/bundles.php`:

```
