PHPackages                             impactlabs/laravel-error-tracker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. impactlabs/laravel-error-tracker

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

impactlabs/laravel-error-tracker
================================

Track errors by their business impact - know which bugs cost you money. Lightweight alternative to Sentry/Flare.

00PHP

Since Oct 29Pushed 6mo agoCompare

[ Source](https://github.com/selimppc/laravel-error-tracker)[ Packagist](https://packagist.org/packages/impactlabs/laravel-error-tracker)[ RSS](/packages/impactlabs-laravel-error-tracker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Error Tracker by Impact Labs
====================================

[](#laravel-error-tracker-by-impact-labs)

[![Latest Version on Packagist](https://camo.githubusercontent.com/35adfc5dc57ca1fad29ddd63ab43ca731049fc95b048a77bc64f85a9489ec725/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696d706163746c6162732f6c61726176656c2d6572726f722d747261636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/impactlabs/laravel-error-tracker)[![Total Downloads](https://camo.githubusercontent.com/2d8c95ddfc4baac8f5a358e2c55c6d6b72beb2c9afd63e2628ee5b79382f75dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696d706163746c6162732f6c61726176656c2d6572726f722d747261636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/impactlabs/laravel-error-tracker)[![GitHub Tests Action Status](https://camo.githubusercontent.com/df0725a7115e938524b61d366c40b6f509cea0178c2c5e899d20c1e18687dc37/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73656c696d7070632f6c61726176656c2d6572726f722d747261636b65722f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/selimppc/laravel-error-tracker/actions?query=workflow%3Atests+branch%3Amain)

A Laravel package that tracks not just errors, but their **business impact**. Perfect for SaaS, AdTech, and e-commerce platforms where errors have measurable financial consequences.

🎯 What Makes This Different
---------------------------

[](#-what-makes-this-different)

Unlike traditional error trackers, this package answers:

- **"Which errors are costing us money?"**
- **"Which customers are affected?"**
- **"Should we fix this NOW or later?"**

✨ Features
----------

[](#-features)

- 🎯 **Business Impact Tracking** - Track revenue loss, affected customers, and business metrics
- 🔥 **Smart Priority Scoring** - Automatically prioritize errors by business impact
- 📊 **Context Enrichment** - Capture business entities, user context, and system state
- 🔔 **Intelligent Notifications** - WhatsApp, Slack, Email with actionable insights
- 📡 **Flexible Forwarding** - Send logs to Elasticsearch, Graylog, Sentry, Datadog, etc.
- ⚡ **Lightweight &amp; Fast** - &lt;500KB memory, 3-6ms execution (async mode)
- 🎨 **Simple Usage** - One-line trait implementation

📦 Installation
--------------

[](#-installation)

```
composer require impactlabs/laravel-error-tracker
```

Publish the config and migrations:

```
php artisan vendor:publish --tag=error-tracker
php artisan migrate
```

🚀 Quick Start
-------------

[](#-quick-start)

### Option 1: Using Traits (Recommended)

[](#option-1-using-traits-recommended)

```
use ImpactLabs\ErrorTracker\Traits\TracksBusinessErrors;

class Campaign extends Model
{
    use TracksBusinessErrors;

    public function process()
    {
        try {
            // Your business logic
        } catch (\Exception $e) {
            // One line - auto-detects context!
            $this->reportError($e);
            throw $e;
        }
    }
}
```

### Option 2: Manual Reporting

[](#option-2-manual-reporting)

```
use ImpactLabs\ErrorTracker\Facades\ErrorTracker;

ErrorTracker::report($exception)
    ->withAdvertiser($advertiserId)
    ->withCampaign($campaignId)
    ->withRevenueImpact(5000.00)
    ->withUserTier('premium')
    ->send();
```

### Option 3: Global Handler

[](#option-3-global-handler)

```
// In app/Exceptions/Handler.php
public function register()
{
    $this->reportable(function (\Throwable $e) {
        \ImpactLabs\ErrorTracker\Facades\ErrorTracker::report($e)->send();
    });
}
```

⚙️ Configuration
----------------

[](#️-configuration)

Configure in `.env`:

```
# Enable tracking
ERROR_TRACKER_ENABLED=true
ERROR_TRACKER_ASYNC=true

# Elasticsearch forwarding
ES_ERROR_TRACKER_ENABLED=true
ES_ERROR_TRACKER_HOST=http://localhost:9200

# WhatsApp notifications
WHATSAPP_ERROR_ENABLED=true
WHATSAPP_API_URL=your-whatsapp-api-url
WHATSAPP_ERROR_PHONE=8801234567890
WHATSAPP_ACCESS_TOKEN=your-token

# Slack notifications
SLACK_ERROR_ENABLED=true
SLACK_ERROR_WEBHOOK=your-slack-webhook
```

📊 View Top Errors
-----------------

[](#-view-top-errors)

```
# Show top errors by priority
php artisan error-tracker:top

# Show by revenue impact
php artisan error-tracker:top --by=revenue

# Show for specific advertiser
php artisan error-tracker:top --advertiser=123
```

🔌 Supported Log Forwarders
--------------------------

[](#-supported-log-forwarders)

### Self-hosted

[](#self-hosted)

- ✅ Elasticsearch
- ✅ Graylog
- ✅ Grafana Loki

### Managed Services

[](#managed-services)

- ✅ Sentry
- ✅ Datadog
- ✅ Logtail (Better Stack)

### Custom

[](#custom)

- ✅ Any HTTP endpoint

🧪 Testing
---------

[](#-testing)

```
composer test
```

📝 Changelog
-----------

[](#-changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

🔒 Security
----------

[](#-security)

If you discover any security related issues, please email  instead of using the issue tracker.

💖 Credits
---------

[](#-credits)

- [Selim Reza](https://github.com/selimreza) - Creator &amp; Maintainer
- [All Contributors](../../contributors)

📄 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance47

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a4429487371badfeeef03e35a3c450a8262cde65131ad481dbe417c5fe56e47b?d=identicon)[selimppc](/maintainers/selimppc)

### Embed Badge

![Health badge](/badges/impactlabs-laravel-error-tracker/health.svg)

```
[![Health](https://phpackages.com/badges/impactlabs-laravel-error-tracker/health.svg)](https://phpackages.com/packages/impactlabs-laravel-error-tracker)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.1k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M137](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
