Flare by Spatie
    • Error Tracking
    • Performance Monitoring
  • Pricing
  • Docs
  • Insights
  • Changelog
  • Back to Flare
  • Sign in
  • Try Flare for free
  • Error Tracking
  • Performance Monitoring
  • Pricing
  • Docs
  • Insights
  • Changelog
    • Back to Flare
    • Try Flare for free
    • Sign in
Flare Flare Laravel Laravel PHP PHP JavaScript JavaScript
  • General
  • Introduction
  • Installation
  • Censoring collected data
  • Ignoring collected data
  • Errors
  • Adding custom context
  • Customising error grouping
  • Handling errors
  • Linking to errors
  • Reporting errors
  • Sending logs to Flare
  • Performance
  • Introduction
  • Sampling
  • Limits
  • Modify spans and events
  • Data Collection
  • Application info
  • Application lifecycle
  • Cache events
  • Console commands
  • Customise error report
  • Database transactions
  • Dumps
  • Errors when tracing
  • Exception context
  • External http requests
  • Filesystem operations
  • Git information
  • Glows
  • Identifying users
  • Logs
  • Queries
  • Redis commands
  • Requests
  • Routing
  • Server info
  • Solutions
  • Spans
  • Stacktrace arguments
  • Views
  • Older Packages
  • Flare Client PHP V1

Censoring collected data

The Flare client collects a large amount of data within your application. It is possible to configure this by configuring the Flare client:

$config = FlareConfig::make('YOUR_API_KEY')->useDefaults();

Flare::make($config)->registerFlareHandlers();

We've initialised the config with the Flare defaults, but you can mix and match your own config.

Anonymising IP's

By default, the Flare client collects information about your application users' IP addresses. To disable this information, call the censorClientIps() method on your Flare config instance.

$config->censorClientIps();

Censoring request/response body fields

When Flare collects information about a web request or response, the Flare client passes on any request/response fields present in the body.

Sometimes, such as on a login page, these request fields may contain a password you don't want to send to Flare.

To censor specific fields' values, you can call censorBodyFields. You should pass the names of the fields you wish to censor:

$config->censorBodyFields('password');

This will replace the value of any body fields named "password" with the value "<CENSORED>".

By default, Flare will censor the password and password_confirmation fields.

Censoring request/response headers

When Flare collects information about a web request or response, the Flare client passes on any request/response headers present.

Just like with the body fields, these headers can be censored. You can do this by calling censorHeaders on the Flare Config:

$config->censorHeaders('X-API-KEY');

When doing so, the value of the headers will be changed to "<CENSORED>" when sent to Flare.

By default, Flare will censor the following headers:

  • API-KEY
  • Authorization
  • Cookie
  • Set-Cookie
  • X-CSRF-TOKEN
  • X-XSRF-TOKEN
Installation Ignoring collected data
  • On this page
  • Anonymising IP's
  • Censoring request/response body fields
  • Censoring request/response headers

Track errors and fix slowdowns with Flare, the full-stack application monitoring platform for Laravel, PHP & JavaScript.

  • Platform
  • Error Tracking
  • Performance Monitoring
  • Pricing
  • Support
  • Resources
  • Blog
  • Changelog
  • Documentation
  • Affiliate program
  • uptime status badge Service status
  • Terms of use
  • DPA
  • Privacy & cookie Policy
Flare