Flare by Spatie
    • Error Tracking
    • Performance Monitoring
    • Logs
  • Pricing
  • Docs
  • Blog
  • Changelog
  • Back to Flare ⌘↵ Shortcut: Command or Control Enter
  • Sign in
  • Try Flare for free
  • Error Tracking
  • Performance Monitoring
  • Logs
  • Pricing
  • Docs
  • Blog
  • Changelog
    • Back to Flare ⌘↵ Shortcut: Command or Control Enter
    • Try Flare for free
    • Sign in
Flare Flare PHP PHP JavaScript JavaScript Protocol Protocol
JavaScript
  • JavaScript
  • React
  • Vue
  • Svelte
  • Alpine
  • Inertia
  • React Native
  • Electron
  • Getting Started
  • Introduction
  • Quick start
  • CDN installation
  • Errors
  • Reporting errors
  • Client hooks
  • Sourcemaps
  • Tracing
  • How tracing works
  • What gets traced
  • Web vitals
  • Manual spans
  • Sampling
  • Profiling
  • How component profiling works
  • Logs
  • Introduction
  • Levels
  • Attributes
  • Data Collection
  • Adding custom context
  • Adding glows
  • Automatic breadcrumbs
  • GDPR consent
  • Identifying users
  • Reference
  • API
  • Configuration

Adding glows

View as Markdown

In addition to custom context items, you can also add "Glows" to your application. Glows allow you to add little pieces of information, that can later be found in a chronological order in the "Debug" tab of an error occurrence in Flare.

You can think of glows as breadcrumbs that can help you track down which parts of your code an exception went through.

Glows are breadcrumbs that you add yourself in code. Flare can also record breadcrumbs for you from clicks, form changes, requests, and navigations. See automatic breadcrumbs.

Adding a glow

flare.glow("User clicked checkout", "info", { cartItems: 3, total: 49.99 });
Parameter Type Default Description
name string A short description of the event.
level string info The severity level (see below).
data object | object[] [] Additional data to attach to the glow.

Message levels

The following levels are available: debug, info, notice, warning, error, critical, alert, and emergency.

flare.glow("Application booted", "debug");
flare.glow("User authenticated", "info", { userId: 42 });
flare.glow("Payment retry", "warning", { attempt: 3 });
flare.glow("Payment failed", "error", { reason: "card_declined" });

Glow lifecycle

Glows accumulate in memory throughout the browser session. When an error is reported, the most recent glows (up to maxGlowsPerReport) are attached to the report.

Glows are not automatically cleared after a report is sent. They persist and will be included in subsequent reports too. In a single-page application with long-lived sessions, you may want to call clearGlows() at key points (e.g. after a route change) to keep breadcrumbs relevant.

Glows are stored in memory only and are lost on page refresh.

Clearing glows

You can clear all collected glows using the clearGlows method:

flare.clearGlows();

Limiting glows per report

By default, Flare keeps the last 30 glows per report. You can change this limit using flare.configure():

flare.configure({
    maxGlowsPerReport: 50,
});

When the limit is reached, the oldest glows are removed first.

Adding custom context Automatic breadcrumbs

On this page

  • Adding a glow
  • Glow lifecycle
  • Clearing glows
  • Limiting glows per report

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
  • Blog
  • Newsletter
  • Changelog
  • Documentation
  • Affiliate program
  • uptime status badge Service status
  • Terms of use
  • DPA
  • Privacy & cookie Policy
  • Follow us on X
Made in by Spatie logo
Flare