Monitor your Symfony application in production

Inspector records HTTP requests and background tasks with the queries inside them, and gives your coding agent the data it needs to fix what goes wrong.

What Inspector records

Every request in your Symfony application becomes a timeline, so you can see what ran and how long it took.

  • HTTP requests
  • Background tasks
  • Database queries
  • Errors and exceptions

GET /api/users

Duration
412.00ms
Segments
8
Result
200
  1. select * from `users`38.20ms
  2. select `offices`.*, `office_user`.`user_id` from `offices` inner join `office_user` on `offices`.`id` = `office_user`.`office_id` where `office_user`.`user_id` = ?48.10ms
  3. select `offices`.*, `office_user`.`user_id` from `offices` inner join `office_user` on `offices`.`id` = `office_user`.`office_id` where `office_user`.`user_id` = ?52.40ms
  4. select `offices`.*, `office_user`.`user_id` from `offices` inner join `office_user` on `offices`.`id` = `office_user`.`office_id` where `office_user`.`user_id` = ?44.70ms
  5. select `offices`.*, `office_user`.`user_id` from `offices` inner join `office_user` on `offices`.`id` = `office_user`.`office_id` where `office_user`.`user_id` = ?56.30ms
  6. select `offices`.*, `office_user`.`user_id` from `offices` inner join `office_user` on `offices`.`id` = `office_user`.`office_id` where `office_user`.`user_id` = ?48.90ms
  7. select `offices`.*, `office_user`.`user_id` from `offices` inner join `office_user` on `offices`.`id` = `office_user`.`office_id` where `office_user`.`user_id` = ?54.20ms
  8. redis:get22.60ms
6 identical queries in one request

Then let your coding agent fix it

Connect your coding agent to the MCP server, and it can read the same data, find the cause and change your code.

Coding agentInspector MCP connected

Why is GET /api/users slow in production?

  • worst_performing_transactions shop-api
  • transaction_details GET /api/users

N+1 query in UserController@index. It loads offices once per user, which adds 6 queries to every request.

app/Http/Controllers/UserController.php
- $users = User::all();+ $users = User::with('offices')->get();

Install Inspector in Symfony

  1. 1

    Install the package

    Add the bundle with Composer.

    Terminal
    composer require inspector-apm/inspector-symfony
  2. 2

    Add your ingestion key

    Paste the key from your Inspector dashboard into the environment file.

    .env
    INSPECTOR_INGESTION_KEY=your-ingestion-key
  3. 3

    Create the configuration file

    Point the bundle at your ingestion key.

    config/packages/inspector.yaml
    inspector:
        ingestion_key: '%env(INSPECTOR_INGESTION_KEY)%'
  4. 4

    Test and deploy

    Check your setup. If every check is green, deploy to production.

    Terminal
    php bin/console inspector:test

Give your coding agent eyes on production

Install the package, connect your agent, and let it find the next problem before your customers do.

Free up to 30K transactions a month. No credit card.