Controlling collected data
Just like the Laravel configuration, the generic PHP client allows you to configure which information should be sent to Flare.
Anonymizing IPs
By default, the Flare client collects information about the IP address of your application users. If you want to disable this information, you can call the anonymizeIp()
method on your Flare client instance.
// Where you registered your client...
$flare = Flare::make('YOUR-FLARE-API-KEY')
->registerFlareHandlers();
$flare->anonymizeIp();
Censoring request body fields
When an exception occurs in a web request, the Flare client will pass on any request fields that are present in the body.
In some cases, such as a login page, these request fields may contain a password that you don't want to send to Flare.
To censor out values of certain fields, you can use call censorRequestBodyFields
. You should pass it the names of the fields you wish to censor.
// Where you registered your client...
$flare = Flare::make('YOUR-FLARE-API-KEY')
->registerFlareHandlers();
$flare->censorRequestBodyFields('password');
This will replace the value of any sent fields named "password" with the value "<CENSORED>".