Slim
Code Execution Monitoring for Slim based applications.
Server requirements
Install
composer require inspector-apm/inspector-slimRegister On Container
$container->set('inspector', function () {
$configuration = new \Inspector\Slim\Configuration('INSPECTOR_INGESTION_KEY');
return new \Inspector\Inspector($configuration);
});use DI\ContainerBuilder;
use Psr\Container\ContainerInterface;
return function (ContainerBuilder $containerBuilder) {
$containerBuilder->addDefinitions([
// Other services definitions...
'inspector' => function (ContainerInterface $container) {
$configuration = new \Inspector\Slim\Configuration('INSPECTOR_INGESTION_KEY');
return new \Inspector\Inspector($configuration);
}
]);
}Attach the middleware
Test that everything works
Add Segments
Learn more about custom segments.
Last updated