Installation
Connect your Symfony application to Inspector.
Requirements
PHP >= 7.2
Symfony ^4.4 | ^5.2 | ^6.x | ^7.x
Install
Type the command below in your terminal to install the latest version of the bundle:
Configure the Ingestion Key
Create the inspector.yaml
configuration file in your config/packages
directory, and put the ingestion_key
field inside:
Add the new variable in your production env file:
You can obtain the ingestion_key
creating a new project in your Inspector dashboard.
To learn more about environment variables configuration you can check the Symfony documentation.
Test & Deploy
Execute the Symfony command below to check if your app is properly configured and can send data to inspector:
Go to https://app.inspector.dev/home
to explore your data.
Inspector will monitor many components by default:
HTTP requests
Console commands
SQL queries
Twig views rendering
But you have several configuration parameters to customize its behavior. Learn more in the next section.
Access the Inspector instance
Inspector instance is binded in the Symfony service container. In your controller, you can type-hint an argument with the Inspector's class name to get a concrete Inspector instance.
Last updated