Skip to content

Error-Tag/ErrorTag-laravel

Repository files navigation

ErrorTag

Latest Version on Packagist tests GitHub Code Style Action Status Total Downloads

ErrorTag is an error monitoring and observability platform. This package is the client SDK that captures errors from your Laravel application and sends them to the ErrorTag dashboard for analysis, alerting, and team collaboration.

Features

  • Automatic Error Capture - Hooks into Laravel's exception handler
  • Intelligent Error Grouping - Groups similar errors using fingerprints
  • Privacy-First - Sanitizes sensitive data (passwords, tokens, headers)
  • Async by Default - Queues errors for background sending
  • Rich Context - Captures request, user, and application data
  • Highly Configurable - Sample rates, ignored exceptions, and more
  • Fully Tested - Comprehensive test coverage with Pest

Installation

Install the package via Composer:

composer require error-tag/errortag-laravel

Publish the configuration file:

php artisan vendor:publish --tag="errortag-laravel-config"

Add your ErrorTag API key to .env:

ERRORTAG_KEY=project_xxxxx
ERRORTAG_ENV=production

Quick Start

Once installed, ErrorTag automatically captures all unhandled exceptions. Test your setup:

php artisan errortag:test --send-test-error

Usage

Automatic Capture

// This exception is automatically captured
throw new Exception('Something went wrong!');

Manual Reporting

use ErrorTag\ErrorTag\Facades\ErrorTag;

try {
    processPayment($order);
} catch (Exception $e) {
    ErrorTag::captureException($e);
}

Adding Context

ErrorTag::context([
    'order_id' => $order->id,
    'payment_provider' => 'stripe',
]);

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages