Configuration
QuietGuard\Monitor\Config is an immutable value object that every part of the core reads from. There is no config file and no global state, you construct one and pass it to a Reporter.
Constructing a Config
All properties are public readonly, so a Config cannot be mutated after construction.
Options
| Parameter | Type | Default | Description |
|---|---|---|---|
url | ?string | (required) | Base URL of the Quiet Guard server. Endpoint paths are appended to it; a trailing slash is trimmed. |
key | ?string | (required) | 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 context. |
environments | array<int,string> | [] | Report only from these environments; an empty array means all environments. |
traceLimit | int | 0 | Stack-trace frames kept on an exception payload. 0 (the default) ships the full trace; a positive value trims. |
redact | array<int,string> | every shape | Value shapes masked before sending: email, iban, nir, card, phone. Pass [] to send payloads untouched. |
customRedactions | array<string,string> | [] | Your own shapes, as label => PCRE pattern. A label of customer_ref masks as [redacted:customer_ref]. |
Helper methods
isConfigured(): boolreturnstrueonly when bothurlandkeyare non-empty. TheReportercalls this before every send and silently does nothing when the client is not configured.reportsFrom(?string $environment): boolreturnstruewhenenvironmentsis empty (report everywhere) or when the given environment is in the list. This is the gate an adapter uses to decide whether to report at all in the current environment: theReporteritself does not call it, so the host decides when to apply it.
A note on release and traceLimit
Config carries release and traceLimit as the single source of truth. When no Payload\ExceptionPayloadBuilder is passed to the Reporter, one is derived from the Config automatically, so both values apply to every report out of the box. Adapters that construct their own builder read them off the Config and pass them in when they wire the Reporter.
You are reading the PHP Core v1.0 documentation.