Configuration
The bundle is configured under a single monitor tree, conventionally in config/packages/monitor.yaml. Every value maps directly onto the monitor-php core types the bundle wires for you.
Full reference
Options
| Key | Type | Default | Description |
|---|---|---|---|
enabled | bool | true | Master switch. When false, the bundle registers no services at all, nothing is captured. |
url | string | null | Base URL of your Quiet Guard server. Endpoint paths are appended to it; a trailing slash is trimmed. |
key | string | null | The per-project API token, sent as Authorization: Bearer <key>. |
timeout | int | 3 | Per-request transport timeout, in seconds. |
release | string | null | Optional release identifier (e.g. a commit SHA) attached to exception and log context. |
trace_limit | int | 0 | 0 (the default) ships the full stack trace with every exception; a positive value trims the payload to that many frames. |
environments | list of string | [] | Report only from these environments. Empty means report from all environments. Matched against kernel.environment. |
scrub | list of string | see below | Context keys whose values are masked before sending (recursive, case-insensitive). |
logs.enabled | bool | false | Turn log forwarding on. The handler service is always registered while the bundle is enabled; when false it drops every record. You still have to attach it to Monolog, see Usage. |
logs.level | string | warning | Minimum level the handler captures (a Monolog level name). |
logs.max_batch | int | 200 | Flush the log buffer to the server once it reaches this many records. |
Default scrub keys
When you do not set scrub, the bundle uses:
Setting scrub replaces this list, so include the defaults you still want to keep.
Environment variables
Nothing forces you to use environment variables, but it is the recommended pattern so secrets stay out of the repository. A typical wiring:
The %env(default::MONITOR_RELEASE)% form falls back to an empty value when the variable is unset, so release simply stays empty.
Restricting environments
By default (environments: []) the bundle reports from every environment, including dev. To report only from production:
Both the exception subscriber and the Monolog log handler check this list against kernel.environment before sending anything, so in any other environment nothing leaves your application, neither exceptions nor logs.
How the config maps to services
| Config | Service built |
|---|---|
url, key, timeout, release, environments, trace_limit | monitor.config (Config) |
scrub | monitor.scrubber (Scrubber) |
trace_limit, release | monitor.payload_builder (ExceptionPayloadBuilder) |
| — | monitor.http_client (CurlHttpClient), monitor.reporter (Reporter), monitor.exception_subscriber |
logs.* | monitor.log_handler (MonitorHandler), always registered while the bundle is enabled; with logs.enabled: false it drops every record, so a monolog.yaml referencing it keeps compiling |
See Usage for how these services behave at runtime.
You are reading the Symfony Bundle v1.0 documentation.