PHPackages                             tobento/app-profiler - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. tobento/app-profiler

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

tobento/app-profiler
====================

App profiler.

2.0(7mo ago)041↓33.3%5MITPHPPHP &gt;=8.4

Since May 11Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/tobento-ch/app-profiler)[ Packagist](https://packagist.org/packages/tobento/app-profiler)[ Docs](https://www.tobento.ch)[ RSS](/packages/tobento-app-profiler/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (4)Dependencies (17)Versions (6)Used By (5)

App Profiler
============

[](#app-profiler)

The profiler is a development tool that gives detailed information about the execution of a HTTP request or console commands if enabled in the config file.

Table of Contents
-----------------

[](#table-of-contents)

- [Getting Started](#getting-started)
    - [Requirements](#requirements)
- [Documentation](#documentation)
    - [App](#app)
    - [Profiler Boot](#profiler-boot)
    - [Profiler Config](#profiler-config)
    - [Profiles](#profiles)
    - [Available Collectors](#available-collectors)
        - [Boots Collector](#boots-collector)
        - [Events Collector](#events-collector)
        - [Logs Collector](#logs-collector)
        - [Jobs Collector](#jobs-collector)
        - [Middleware Collector](#middleware-collector)
        - [Request And Response Collector](#request-and-response-collector)
        - [Routes Collector](#routes-collector)
        - [Session Collector](#session-collector)
        - [Storage Queries Collector](#storage-queries-collector)
        - [Translation Collector](#translation-collector)
        - [View Collector](#view-collector)
    - [Creating A Collector](#creating-a-collector)
- [Credits](#credits)

---

Getting Started
===============

[](#getting-started)

Add the latest version of the app profiler project running this command.

```
composer require tobento/app-profiler

```

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

[](#requirements)

- PHP 8.4 or greater

Documentation
=============

[](#documentation)

App
---

[](#app)

Check out the [**App Skeleton**](https://github.com/tobento-ch/app-skeleton) if you are using the skeleton.

You may also check out the [**App**](https://github.com/tobento-ch/app) to learn more about the app in general.

Profiler Boot
-------------

[](#profiler-boot)

The profiler boot does the following:

- installs and loads profiler config file
- implements interfaces based on config
- adds collectors based on config
- boots late profiler boot
- on response emit collects data from collectors and may inject the profiler toolbar

```
use Tobento\App\AppFactory;

// Create the app
$app = new AppFactory()->createApp();

// Add directories:
$app->dirs()
    ->dir(realpath(__DIR__.'/../'), 'root')
    ->dir(realpath(__DIR__.'/../app/'), 'app')
    ->dir($app->dir('app').'config', 'config', group: 'config')
    ->dir($app->dir('root').'public', 'public')
    ->dir($app->dir('root').'vendor', 'vendor');

// Adding boots:
$app->boot(\Tobento\App\Profiler\Boot\Profiler::class);
// ...

// Run the app:
$app->run();
```

Profiler Config
---------------

[](#profiler-config)

The configuration for the profiler is located in the `app/config/profiler.php` file at the default App Skeleton config location where you can configure your profiler for your application.

Profiles
--------

[](#profiles)

The profiler will inject a toolbar from the current profile into HTML responses only. Any AJAX requests will update the profiles selection in the toolbar where you can switch between them.

For other kinds of contents such as JSON responses, use the profiles page. Just browse the the `/profiler/profiles` URL to see all profiles.

Available Collectors
--------------------

[](#available-collectors)

By default, all collectors are defined in the [Profiler Config](#profiler-config). Even if they are set, they will only collect data if the service they collect data from are installed. But you may uncomment the collector if not needed at all.

### Boots Collector

[](#boots-collector)

This collector will show the currently booted boots in the order they were called as well as all registered boots.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\Boots::class,
],
```

### Events Collector

[](#events-collector)

If you have booted the [App Event - Event Boot](https://github.com/tobento-ch/app-event#event-boot), this collector will show the currently dispatched events and listeners.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\Events::class,
],
```

### Jobs Collector

[](#jobs-collector)

If you have booted the [App Queue - Queue Boot](https://github.com/tobento-ch/app-queue#queue-boot), this collector will show the currently pushed jobs.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\Jobs::class,
],
```

### Logs Collector

[](#logs-collector)

If you have booted the [App Logging - Logging Boot](https://github.com/tobento-ch/app-logging#logging-boot), this collector will show the currently logged messages from each logger specified.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\Logs::class,

    // or
    \Tobento\App\Profiler\Collector\Logs::class => [
        // specify the logger names not to collect messages from:
        'exceptLoggers' => ['null'],
    ],
],
```

### Middleware Collector

[](#middleware-collector)

If you have booted the [App Http - Middleware Boot](https://github.com/tobento-ch/app-http#middleware-boot), this collector will show the currently dispatched middlewares as well as the available aliases.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\Middleware::class,
],
```

### Request And Response Collector

[](#request-and-response-collector)

If you have booted the [App Http - Http Boot](https://github.com/tobento-ch/app-http#http-boot), this collector will show the current request and response data.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\RequestResponse::class,
],
```

### Routes Collector

[](#routes-collector)

If you have booted the [App Http - Routing Boot](https://github.com/tobento-ch/app-http#routing-boot), this collector will show all registered routes.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\Routes::class,
],
```

### Session Collector

[](#session-collector)

If you have booted the [App Http - Session Boot](https://github.com/tobento-ch/app-http#session-boot), this collector will show all session data.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\Session::class,

    // or:
    \Tobento\App\Profiler\Collector\Session::class => [
        // specify the data you wont't to hide:
        'hiddens' => [
            '_session_flash_once',
            '_session_flash.old',
        ],
    ],
],
```

### Storage Queries Collector

[](#storage-queries-collector)

If you have booted the [App Database - Database Boot](https://github.com/tobento-ch/app-database#database-boot), this collector will show all queries executed from any [Storage Databases](https://github.com/tobento-ch/service-database-storage) configured.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\StorageQueries::class,
],
```

### Translation Collector

[](#translation-collector)

If you have booted the [App Translation - Translation Boot](https://github.com/tobento-ch/app-translation#translation-boot), this collector will show all missed translations.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\Translation::class,
],
```

### View Collector

[](#view-collector)

If you have booted the [App View - View Boot](https://github.com/tobento-ch/app-view#view-boot), this collector will show the currently rendered views and assets.

In the `app/config/profiler.php` file:

```
'collectors' => [
    \Tobento\App\Profiler\Collector\View::class,

    // or you may configure only the data to collect:
    \Tobento\App\Profiler\Collector\View::class => [
        'collectViews' => true,
        'collectAssets' => false,
    ],
],
```

Creating A Collector
--------------------

[](#creating-a-collector)

You may create your own data collector by implementing the `Tobento\App\Profiler\Collector\CollectorInterface` or the `Tobento\App\Profiler\Collector\LateCollectorInterface`.

By implementing the `CollectorInterface`, the collector class will be created after the profiler gets booted, whereas the class implementing the `LateCollectorInterface` will be created after the late profiler boot gets booted.

I recommend investing the available collectors for its implementation.

Credits
=======

[](#credits)

- [Tobias Strub](https://www.tobento.ch)
- [All Contributors](../../contributors)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance63

Regular maintenance activity

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~102 days

Total

6

Last Release

226d ago

Major Versions

1.x-dev → 2.02025-10-03

PHP version history (2 changes)1.0.0PHP &gt;=8.0

2.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/055d6a1b5c2384bb179c75ab0b55914231d898fdc4dffeb30770f81200e52206?d=identicon)[TOBENTOch](/maintainers/TOBENTOch)

---

Top Contributors

[![tobento-ch](https://avatars.githubusercontent.com/u/16684832?v=4)](https://github.com/tobento-ch "tobento-ch (18 commits)")

---

Tags

profilerpackagetestsapptobento

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tobento-app-profiler/health.svg)

```
[![Health](https://phpackages.com/badges/tobento-app-profiler/health.svg)](https://phpackages.com/packages/tobento-app-profiler)
```

PHPackages © 2026

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