Lumen is an amazingly fast micro-framework by Laravel. Even though Atatus PHP APM supports major frameworks without any extra code, Lumen applications need some extra configuration. This integration includes:
  1. Custom Middleware to set proper transaction name.
  2. Custom Exception handler to report errors.

Include AtatusLumenMiddleware.php

Save the following contents in the file app/Http/Middleware/AtatusLumenMiddleware.php

Add the atatus middleware to the app

You have to add the Atatus middleware to the app.

Include ChainedExceptionHandler.php

Save the following contents in the file app/Exceptions/ChainedExceptionHandler.php

Include AtatusExceptionHandler.php

Save the following contents in the file app/Exceptions/AtatusExceptionHandler.php

Add the exception handler to the app

Replace the $app->singleton() call which registers the concrete exception handler in bootstrap/app.php with the following: