Why error tracking is crucial for your application
Errors will inevitably occur in your application. There is no way around it. If you notice them while working locally, you can fix them immediately. However, it gets more tricky if your application is already live. In production, you are no longer the only person triggering errors and the most crucial errors might go unnoticed. This is where error tracking software like Flare comes in handy.
Why
Before utilizing a new tool, it's always important to ask yourself, "Why do I need this?". So, first, let's discuss the significance of error tracking.
When an error occurs in production, you will notice the errors in your log files, or a user will tell you about it, right? So why do you need another tool for that? There are two main reasons. First, you'll want to know about these issues as soon as possible: what happened, why did it happen, and do you need to fix it immediately? These are questions you'll want answered in the first couple of minutes after something goes wrong. You don't want to wait for your users to report these issues because chances are, they never will.
The best case scenario is that you get notified about an error that occurred, and you're able to fix it and contact the affected user before they contact you. As a user, I would love that, and it's only possible if you know about your errors and their context sooner rather than later.
That's why we need bug trackers. A bug tracker will tell you about the error no matter who triggers it. It will also show you an overview of occurred errors and more information about them that will help you fix them. Having all production errors displayed in a user-friendly UI makes them easier to handle than searching through log files or depending on users.
A real life example
Christoph sells his online courses over a little custom platform. One day, a customer gets in touch about an issue while trying to purchase one of his courses. It turns out Christoph's payment provider changed their webhook calls, which led to an error that went unnoticed.
Unfortunately, this mystery customer was one of many to experience this issue. There have been several before her who didn't mention or report the problem. Without even knowing it, Christoph lost several interested customers because he wasn't aware of the errors in his checkout flow.
How
Introducing Flare, the error tracking tool for Laravel
Several excellent bug trackers are already available for PHP and JavaScript. Established solutions like Bugsnag, Sentry, and Rollbar offer reliable error tracking. However, Flare stands out due to its tailored Laravel integration. Let's explore some features that make Flare stand out from other bug trackers and discuss how its Laravel integration works wonders for Artisans like you.
Let's start with your local development environment. Other error trackers typically only report production errors. However, Flare's PHP client has a beautiful error page to make local development much more enjoyable.
Apart from displaying the exception, error message, and stacktrace in a clean and modern UI, it's also packed with additional context. Executed SQL queries and timings are listed, request parameters are revealed, and view data is displayed. Additionally, Ignition has a free-forever share feature to share an error with colleagues in Slack or GitHub quickly. It also offers dark mode, editor links, relevant documentation links, and AI solutions.
If you're using Laravel, you might've noticed that Ignition comes pre-installed in the framework as the default error page, making it even easier to configure an API key and start tracking production errors.
You can think of Flare as the Ignition error page in production. In fact, you'll see the Ignition interface is an important part of the Flare UI:
Flare takes error handling to the next level. It doesn't just list all reported errors across all your users, but it also provides extensive insights necessary to debug problems. Aside from error tracking, Flare also has a great GitHub integration, extensive notification settings, and project and team organizing options.
Getting Started with Flare
Enabling Flare in a Laravel project couldn't be more effortless. It's a 3-step process, and you can get started with a 10-day trial for free. There is no need to provide credit card details.
Once you have an account, let's create a new project. A project holds all the errors for one application's environment. Please give it a name and select the appropriate environment and technology. Next, you will see instructions on how to connect your application to this new project:
It boils down to:
-
Install Ignition, the Flare client, and pretty error page
-
Configure your API key
-
Configure Laravel to send errors to Flare
Afterward, you can use the "php artisan flare:test" command to test the integration. If set up correctly, it will send a test exception to Flare, which will show up in your project seconds later.
Congratulations, you are now tracking your application's errors. This was the most critical step toward a better error-handling future.
Developer Experience
Design and UI are essential to give your users a great experience. In the same way, good documentation and a well-coded client package are essential to give developers a great developer experience (DX).
Fortunately, the Spatie team working on Flare has several years and 300 open-source projects of experience creating software with fantastic developer experience.
Another example of good DX are the various filters and insights available for errors. Every time we use Flare to debug a problem, we look for insights or filters that would make the process easier:
Introducing solutions
Ignition and Flare can recognize and fix several commonly occurring errors. If you've ever lost an hour debugging a missing semi-colon or a typo, you'll be glad to learn Flare will automatically pick up on this and suggest a fix. When debugging locally using Ignition, you can even execute these solutions directly from the error page and solve the issue without ever leaving the browser.
Your browser does not support the video tag.
Recently, we've also added opt-in AI solutions using OpenAI's APIs. Every Flare subscription comes with a free daily quota of AI solutions. The future is now 🤖.
GitHub integration
Flare includes a stunning GitHub integration. Once enabled, you can link a Flare project to a GitHub repository. This way, you can link incoming errors to GitHub issues and have the issue automatically close when the error is resolved.
The GitHub integration also works the other way around. If a Flare URL is detected in a GitHub issue, we'll automatically link the issue to the relevant Flare error. If you work with GitHub a lot, this greatly enhances your workflow and opens up new possibilities for project management.
Do you love project management, but don't like GitHub? We're also working on a Jira integration, which should land in the coming few weeks.
Identifying users
When a severe error occurs in your application, you might want to notify the affected users proactively. However, it is usually challenging to identify the affected users from endless log files or traditional error trackers. That's why Flare has you covered by automatically detecting the logged-in user and providing exportable insights about affected users for each error.
Additionally, the insight of affected users makes it even easier to find a user to impersonate locally to debug the problem.
Advanced notifications settings
We already mentioned how important it is to be notified of new errors in your application. Flare has an extensive notification system that lets you customize notifications to your personal needs and the needs of your team.
First, it provides several different notification channels out of the box: mail, Slack, SMS, Telegram, Discord, and Microsoft Teams. Just pick what suits you best. Need something specific? The webhook channel allows for endless customizability.
For each channel, you can customize which notifications you want to receive. For example, it's easy to configure a global notification channel to send a notification about the first occurrence of every error to a Slack channel. But if this error happens the tenth time, you may need to get someone out of bed by texting them.
Customizing notifications to your personal or your team's needs is vital. Having advanced options lets you ensure no one misses a notification for that critical project and no one gets overwhelmed with notification overload.
Conclusion
Bug tracking is a crucial part of building and maintaining any application. Not getting notified about occurring errors can cost you a lot of time and money. Flare is here to help. You don't have to worry about possible problems anymore because Flare will notify you immediately, and its specific focus on Laravel will make debugging even more straightforward.
It is never too late to start tracking errors. Give Flare a try now.