Flare Error tracking made for Laravel
Features Pricing Docs Blog Log in Start free trial Free trial
  • Docs
  • Videos

Documentation

  • General

    • Welcome
    • Projects
    • Errors
    • Error occurrences
    • Using the API
    • Sharing error occurrences
    • Spike protection
    • GitHub integration
  • Ignition for Laravel

    • Installation
    • Configuration
    • Security
    • Controlling collected data
    • Sending logs to Flare
    • Linking to errors
    • Identifying users
    • Adding custom context
    • Adding glows
    • Writing custom middleware
  • Flare for generic PHP projects

    • Installation
    • Controlling collected data
    • Identifying users
    • Linking to errors
    • Adding custom context
    • Adding glows
    • Writing custom middleware
  • Javascript error tracking

    • Installation
    • Framework integrations
    • Adding custom context
    • Adding glows
    • Solution Providers
    • Resolving Bundled Code
  • Solutions

    • Introduction
    • Adding custom solutions
    • Making solutions runnable
    • Using solution providers
    • Writing good solutions
  • Notifications

    • Configuring notifications
    • Mail
    • Slack
    • Telegram
    • SMS
    • Webhooks
    • Discord
    • Microsoft Teams
  • Team management

    • Using multiple teams
    • Subscribing to a plan
    • Receiving invoices
    • Managing team members
    • Inviting guests to projects

Controlling collected data

When you have set up Flare to track your exceptions, you have full control over what data should get collected and sent to Flare.

There are various options that control what information is sent to Flare. These options are inside the reporting key in your flare configuration file.

Anonymizing IPs

By default, Flare does not collect and send information about the IP address of your application users. If you want to collect this information, you can set the anonymize_ips option to false in the flare config file.

Censoring request body fields

When an exception occurs in a web request, the Flare client will pass on request fields that are present in the body. By default, Flare will replace the value any fields that are named "password" with "<CENSORED>".

To censor out values of additional fields, you put the names of those fields in the reporting.censor_request_body_fields key of the flare config file.

// config/flare.php

return [
    // ...
    
    'reporting' => [
        // ...
       'censor_request_body_fields' => ['password', 'other_field'],
    ]   
]

Git information

By default, Flare collects the current commit hash, the commit message as well as the repository URL so that you can easily link an exception with the commit hash that was checked out on your deployed application. If you wish to disable this information, set the collect_git_information key to false.

SQL Queries

Flare automatically collects all of your executed queries that happened before the exception occurred. This does not include any bindings within your queries. If you do not want to collect SQL query information at all, set the report_queries key to false.

In addition to queries, Flare can also collect the values of the query bindings for you. This can be very useful to see the actual values of the data within your queries. To disable this, set the report_query_bindings key to false.

View data

When Flare detects an exception that occurs in one of your Blade views, Flare can collect and send the view data along with the exception. To disable this, set the report_view_data key to false.

Users

When a user is logged in to your Laravel application and an error occurs then a copy of the user model is sent to Flare.

You can hide certain properties by adding them to the $hidden property of your model or by implementing a toFlare method on the model:

class User extends BaseUser
{
    public function toFlare()
    {
        return [
            'name' => $this->name,
            'email' => $this->email
        ];
    }
}
Previous topic Next topic

On this page

  • Anonymizing IPs
  • Censoring request body fields
  • Git information
  • SQL Queries
  • View data
  • Users

About Flare

  • Home
  • Features
  • Pricing
  • Support

Resources

  • Blog
  • Changelog
  • Docs
  • Ignition

App

  • Log in
  • Start free trial
SPATIE
  • Service status
  • Terms of use
  • Privacy & cookie policy