Monitor your Drupal application in production

The Inspector module reports HTTP traffic, database queries and unhandled exceptions, and gives your coding agent the data it needs to fix what goes wrong.

What Inspector records

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

  • HTTP traffic
  • Database queries
  • Unhandled 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 Drupal

  1. 1

    Install the module

    Add the module with Composer.

    Terminal
    composer require drupal/inspector_monitoring
  2. 2

    Add your ingestion key

    Go to Admin, Configuration, Development, Inspector Monitoring. Paste the key from your Inspector dashboard and save.

  3. 3

    Test and deploy

    Browse your site and check that data reaches the dashboard. If it does, release the integration to production.

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.