Flare by Spatie
    • Error Tracking
    • Performance Monitoring
    • Logs Coming soon
  • Pricing
  • Docs
  • Insights
  • Changelog
  • Back to Flare ⌘↵ Shortcut: Command or Control Enter
  • Sign in
  • Try Flare for free
  • Error Tracking
  • Performance Monitoring
  • Logs Coming soon
  • Pricing
  • Docs
  • Insights
  • Changelog
    • Back to Flare ⌘↵ Shortcut: Command or Control Enter
    • Try Flare for free
    • Sign in
Flare Flare Laravel Laravel PHP PHP JavaScript JavaScript React React Vue Vue Protocol Protocol
  • General
  • Installation
  • Censoring collected data
  • Ignoring collected data
  • Flare daemon
  • Laravel Octane
  • Laravel Vapor
  • Errors
  • Introduction
  • Customise error report
  • Customising error grouping
  • Linking to errors
  • Logs
  • Introduction
  • Levels
  • With errors
  • Performance
  • Introduction
  • Sampling
  • Limits
  • Modify spans and span events
  • Data Collection
  • Application info
  • Cache events
  • Console commands
  • Custom context
  • Database transactions
  • Dumps
  • Errors when tracing
  • Exception context
  • External http requests
  • Filesystem operations
  • Git information
  • Glows
  • Identifying users
  • Jobs and queues
  • Laravel context
  • Livewire
  • Queries
  • Redis commands
  • Requests
  • Server info
  • Spans
  • Stacktrace arguments
  • Views
  • Older Packages
  • Laravel Flare V2
  • Laravel Flare V1
  • Ignition

Customise grouping

Flare has a unique grouping algorithm that groups similar error occurrences into errors to make understanding what's going on in your application easier.

While the default grouping algorithm works for 99% of cases, there are some cases where you might want to customise it.

This can be done on an exception class basis by configuring the overridden_groupings array in your flare.php config file:

use Spatie\FlareClient\Enums\OverriddenGrouping;

// flare.php config file

'overridden_groupings' => [
    SomeExceptionClass::class => OverriddenGrouping::ExceptionClass,
],

Available grouping strategies

Strategy Groups by Use case
ExceptionClass Exception class only Group all exceptions of the same type together, regardless of message or stack trace
ExceptionMessage Exception message only Group by message content, useful when the exception class is generic
ExceptionMessageAndClass Exception class + message More granular grouping, but be careful as slightly different messages create separate groups
FullStacktraceAndExceptionClassAndCode Full stacktrace + exception class + exception code Useful for API exceptions like ClientException where the exception is always thrown from the same location, but you want to distinguish by HTTP status code

Warning: Be careful when choosing a grouping strategy. If the values you group by are unique for every occurrence (e.g. exception messages containing timestamps or IDs), each occurrence will create a separate error in Flare.

Customise error report Linking to errors
  • On this page
  • Available grouping strategies

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

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