Adding glows
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.
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.