Flare by Spatie
  • Features
  • Pricing
  • Docs
  • Blog
  • LOG IN
  • START TRACKING
  • Home
  • Features
  • Pricing
  • Docs
  • Blog
    • Try Flare for free
    • Sign in
Flare Flare Laravel Laravel PHP PHP JavaScript JavaScript
  • General
  • Introduction
  • Installation
  • Censoring collected data
  • Ignoring collected data
  • Laravel Octane
  • 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 span events
  • Data Collection
  • Application info
  • 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
  • Jobs and queues
  • Laravel context
  • Livewire
  • Logs
  • Queries
  • Redis commands
  • Requests
  • Server info
  • Solutions
  • Spans
  • Stacktrace arguments
  • Views
  • Older Packages
  • Laravel Flare V1
  • Ignition

Jobs & queues

Flare can collect information about the jobs being executed in your application. This includes:

  • The job name
  • The job class
  • The job queue
  • The job connection
  • The job UUID
  • The job tags
  • The job properties
  • And so much more...

This functionality is enabled by default, but you can disable it by ignoring the Jobs collect in config.php:

use Spatie\FlareClient\Enums\CollectType;

'collects' => FlareConfig::defaultCollects(
    ignore: [CollectType::Jobs],
),

You can configure the maximum number of jobs tracked while collecting data in the case of an error as such:

'collects' => FlareConfig::defaultCollects(
    extra: [
        CollectType::Jobs->value => [
            'max_items_with_errors' => 10,
        ],
    ]
),

When a job is executed, its further chain of jobs will be collected to provide even more insight into the job and its chain. It is possible to define the maximum depth of such a chain as such:

'collects' => FlareConfig::defaultCollects(
    extra: [
        CollectType::Jobs->value => [
            'max_chained_job_reporting_depth' => 5,
        ],
    ]
),

To disable the inspection of job chains, you can set the depth to 0:

'collects' => FlareConfig::defaultCollects(
    extra: [
        CollectType::Jobs->value => [
            'max_chained_job_reporting_depth' => 0,
        ],
    ]
),

Laravel Horizon

It is possible to connect a Flare project with your Laravel Horizon installation. This way, you can quickly jump from an exception to the corresponding job in Horizon and retry it.

Configuration

Within your project settings, open up the Laravel page:

screenshot

Provide the URL to your Laravel Horizon dashboard(most of the time, this looks like https://your-app-domain.com/horizon) and click save.

Usage

When viewing an exception in Flare triggered by a Horizon Job, you can now quickly jump to the corresponding job in Horizon:

screenshot

Please note that by default, Laravel Horizon will keep the failed job information for seven days; failed jobs older than seven days will no longer be available in Horizon. You can adjust this setting in your horizon.php configuration by updating the trim option:

'trim' => [
    'recent' => 60,
    'pending' => 60,
    'completed' => 60,
    'recent_failed' => 43200, // 30 days
    'failed' => 43200, // 30 days
    'monitored' => 10080,
],
Identifying users Laravel context
  • On this page
  • Laravel Horizon

Monitor your web apps and sites from errors to slowdowns with Flare, the easiest application monitoring platform for Laravel, PHP & Javascript.

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