Laravel 11 recently introduced a nice new feature called Context. Both Ignition and Flare have been updated to collect and show all context.
What is Context?
Laravel's latest feature allows you to set some contextual values anywhere in your app. This allows you to store and exchange information across different requests, jobs, and commands in your application. This information is written alongside logs, aiding in understanding the sequence of events leading up to the log entry or error.
use Illuminate\Support\Facades\Context;
Context::add('url', $request->url());
Context::add('trace_id', Str::uuid()->toString());
You can easily retrieve these values anywhere in your app.
use Illuminate\Support\Facades\Context;
Context::all(); // returns all context
Now, this isn’t all that special. With the examples given above, you’d be right to think that Context is just some array-backed cache.
But the special thing that Context does is make all of this information available to any job dispatched in the request where context was set.
dispatch(new MyJob()); // this job will receive the context
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Context;
class MyJob implements ShouldQueue
{
public function handle()
{
// returns the context that was
// set in the request that dispatched
// this job
$allContent = Context::all();
// do some work
// ...
}
}
Context in Ignition and Flare
Ignition, the error page we created and used in Laravel by default, now displays all set context.
Here’s what that looks like in Ignition.

Of course, Flare now collects and displays context as well. Here’s what that looks like when you have an exception in a request or job that holds context.

Continue reading
One core, many clients: the new Flare JavaScript client architecture
We recently reshaped the Flare JavaScript client from a single browser library and a few thin framework specific packages into a small family of packages built on a shared, platform-agnostic core. This post explains why we did it, what the core package exposes, how the browser and Node SDKs are built on top of it, why the React, Vue, and Svelte packages sit one level higher, and how anyone can use the same core to write a Flare JS client for a platform we do not ship ourselves.
Dries
Logging is here!
Logging is now available for all Flare users! Send any log from your app to Flare and use our polished interface to filter and search your logs in real-time.
Jimi
Subscribe to Backtrace, our quarterly Flare newsletter
No spam, just news & product updates