Insights
Your Laravel routes can carry metadata now, and Flare shows it
Laravel just landed a neat little feature: route metadata. You can attach arbitrary metadata to a route and read it back later.
Route::get('/users', [UserController::class, 'index'])
->metadata(['head' => ['title' => 'Users']]);
And then somewhere down the line:
$request->route()->getMetadata('head.title'); // 'Users'
Cool, right? It's a clean way to attach metadata to a route without inventing your own conventions.
So where does Flare come in?
When something goes wrong on a request, that route's metadata is part of the story. Maybe you flagged the route as internal, tagged it with a feature flag, or added some specific logic based upon the route.
That's exactly the kind of context you want sitting next to a stack trace when you're trying to figure out what happened.
The newest laravel-flare client (3.1.0) sends this info along with errors. Flare picks it up and shows it for you:

Scalar values show up inline. Nested values get rendered as JSON so you can actually read them.
It works for performance traces too
The same metadata flows through to performance monitoring. Open up a trace, click into the request span, and the Route panel shows the metadata right alongside everything else:

Getting it
Make sure you're on the 3.1.0 version of the laravel-flare client, add some metadata to your routes, and you're done.
Happy debugging!
Continue reading
Bringing Flare back to Laravel 10 and PHP 8.1
Flare now supports Laravel 10 and PHP 8.1 again, so older apps get performance monitoring and logs too. Here’s how we did it.
Ruben
Create richer issues from your errors
When Flare creates an issue on GitHub, GitLab or Linear, you can now pick the assignee and labels right away.
Ruben
Subscribe to Backtrace, our quarterly Flare newsletter
No spam, just news & product updates