Installation
Install the bundle in the Symfony application you want to monitor (not on the Quiet Guard server).
Requirements
- PHP 8.2 or higher
- Symfony 6.4 (LTS), 7.x or 8.x
ext-curl(the default transport) andext-sodium(pulled in by the core)
Require the package
The package is published on Packagist, so a plain composer require installs it:
composer require quiet-guard/monitor-symfony-bundleThis pulls in the framework-agnostic core quiet-guard/monitor-php automatically.
Register the bundle
Symfony Flex registers a bundle from a recipe published in its own index. No recipe exists for this bundle, so add it to config/bundles.php by hand:
// config/bundles.php
return [
// ...
QuietGuard\Monitor\Symfony\MonitorBundle::class => ['all' => true],
];The bundle class is QuietGuard\Monitor\Symfony\MonitorBundle, and its container-extension alias is monitor, so all configuration lives under a monitor key.
Create the configuration file
The bundle reads its options from a monitor config tree. Create config/packages/monitor.yaml:
# config/packages/monitor.yaml
monitor:
url: '%env(default::MONITOR_URL)%'
key: '%env(MONITOR_KEY)%'Then set the matching variables in .env / .env.local:
MONITOR_KEY=your-project-token
# Only for a self-hosted instance: the hosted service is the default
MONITOR_URL=https://monitor.example.comkey is the only value you must provide to start reporting. url is only set for a self-hosted instance: empty or absent, it means the hosted service at https://quietguard.dev, and the %env(default::MONITOR_URL)% form leaves it empty when the variable is unset. See Configuration for every option and its default.
Verify the wiring
Once registered, the bundle defines its services in the container. You can confirm they are present:
php bin/console debug:container monitor.reporter
php bin/console debug:event-dispatcher kernel.exceptionThe monitor.exception_subscriber listener should appear on kernel.exception. Continue with Configuration.
You are reading the Symfony Bundle v1.0 documentation.