PHPackages                             vinkius-labs/watchdog-discord - 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. vinkius-labs/watchdog-discord

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

vinkius-labs/watchdog-discord
=============================

Real-time error monitoring and alerting for Laravel apps via Discord

v1.3.13(9mo ago)31.3k↓50%MITPHPPHP ^8.1|^8.2|^8.3

Since Jul 28Pushed 9mo agoCompare

[ Source](https://github.com/vinkius-labs/watchdog-discord)[ Packagist](https://packagist.org/packages/vinkius-labs/watchdog-discord)[ RSS](/packages/vinkius-labs-watchdog-discord/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (9)Versions (9)Used By (0)

Watchdog Discord
================

[](#watchdog-discord)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8156f1ceb6e0cc65a7babaaee1280b8403be301609bd4252b22d25500cf7acd0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76696e6b6975732d6c6162732f7761746368646f672d646973636f72642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vinkius-labs/watchdog-discord)[![Total Downloads](https://camo.githubusercontent.com/8fb5c77e00bea2b4800b673a8225e542ccca12e5f24005658b35204d371c3361/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f76696e6b6975732d6c6162732f7761746368646f672d646973636f72642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vinkius-labs/watchdog-discord)[![License](https://camo.githubusercontent.com/bc3eec8b3bc660fba36b6dd2322e5783cf0c507286aea76aa9ea472a02e12f78/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f76696e6b6975732d6c6162732f7761746368646f672d646973636f72642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vinkius-labs/watchdog-discord)

**Enterprise-grade real-time error monitoring and alerting system for Laravel applications via Discord webhooks.**

[![20250727_1034_Logo Laravel Watchdog_simple_compose_01k15kpqzmfd8bjwgsrdd36nvw](https://private-user-images.githubusercontent.com/26571/471223007-3be108fb-5ce1-47d5-b3a9-96dba6db5eff.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM4MDAzMTcsIm5iZiI6MTc3MzgwMDAxNywicGF0aCI6Ii8yNjU3MS80NzEyMjMwMDctM2JlMTA4ZmItNWNlMS00N2Q1LWIzYTktOTZkYmE2ZGI1ZWZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzE4VDAyMTMzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA3MDU4OTFlZDE3MmMxZTkyYjVlMzY0ZWJlOTlkNmI3NzY4YWU4N2VhMWQ2ODAwMDgyZTcwYjFjNGI1ZTMyNWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.U3l26Wu_fwT1VNtyBJVXJBZiBBT2wVN1aHdnx6rxbAA)](https://private-user-images.githubusercontent.com/26571/471223007-3be108fb-5ce1-47d5-b3a9-96dba6db5eff.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM4MDAzMTcsIm5iZiI6MTc3MzgwMDAxNywicGF0aCI6Ii8yNjU3MS80NzEyMjMwMDctM2JlMTA4ZmItNWNlMS00N2Q1LWIzYTktOTZkYmE2ZGI1ZWZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzE4VDAyMTMzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA3MDU4OTFlZDE3MmMxZTkyYjVlMzY0ZWJlOTlkNmI3NzY4YWU4N2VhMWQ2ODAwMDgyZTcwYjFjNGI1ZTMyNWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.U3l26Wu_fwT1VNtyBJVXJBZiBBT2wVN1aHdnx6rxbAA)Overview
--------

[](#overview)

Watchdog Discord is a high-performance monitoring solution that provides intelligent error tracking, analytics, and instant Discord notifications for Laravel applications. Built with enterprise scalability in mind, it offers Redis-powered error deduplication, severity scoring, and asynchronous processing to ensure zero impact on application performance.

Key Features
------------

[](#key-features)

- **🚀 High Performance**: Redis-powered error tracking with sub-millisecond performance
- **🔄 Asynchronous Processing**: Queue-based notifications to prevent application slowdown
- **🎯 Smart Deduplication**: Hash-based error grouping and frequency analysis
- **📊 Error Analytics**: Severity scoring, trend detection, and analytics dashboard
- **🛡️ Rate Limiting**: Configurable thresholds to prevent notification spam
- **🌍 Multi-language Support**: Built-in translations for 9 languages
- **🐳 Docker Ready**: Full containerization support for modern deployments

Architecture
------------

[](#architecture)

```
Application Layer
├── Exception Handler    ├── Middleware    ├── Facade    ├── Manual Logging
│
Service Layer
├── Discord Notifier (Central orchestration and payload building)
│
Business Logic Layer
├── Error Tracking Service    ├── Rate Limiter    ├── Queue Manager
│
Data Access Layer
├── Redis Cache    ├── Database (MySQL)    ├── Discord API

```

The system implements a layered architecture with Redis-first caching, database persistence, and configurable async processing for optimal performance in production environments.

Installation
------------

[](#installation)

```
composer require vinkius-labs/watchdog-discord
```

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --provider="VinkiusLabs\WatchdogDiscord\WatchdogDiscordServiceProvider" --tag="watchdog-discord-config"
```

### Run Migrations

[](#run-migrations)

```
php artisan migrate
```

Basic Configuration
-------------------

[](#basic-configuration)

### Environment Setup

[](#environment-setup)

```
# Required
WATCHDOG_DISCORD_ENABLED=true
WATCHDOG_DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your/webhook/url

# Performance (Production)
WATCHDOG_DISCORD_ASYNC_ENABLED=true
WATCHDOG_DISCORD_QUEUE_CONNECTION=redis
WATCHDOG_DISCORD_CACHE_PREFIX=watchdog_prod

# Error Tracking
WATCHDOG_DISCORD_ERROR_TRACKING_ENABLED=true
WATCHDOG_DISCORD_MIN_SEVERITY=7
WATCHDOG_DISCORD_FREQUENCY_THRESHOLD=10

# Rate Limiting
WATCHDOG_DISCORD_RATE_LIMIT_ENABLED=true
WATCHDOG_DISCORD_RATE_LIMIT_MAX=20
WATCHDOG_DISCORD_RATE_LIMIT_WINDOW=5
```

### Discord Webhook Setup

[](#discord-webhook-setup)

1. Navigate to your Discord server settings
2. Go to **Integrations** → **Webhooks**
3. Create a new webhook and copy the URL
4. Add the URL to your `.env` file

Usage
-----

[](#usage)

### Automatic Error Handling

[](#automatic-error-handling)

The package automatically captures and reports Laravel exceptions through the exception handler integration.

### Manual Logging

[](#manual-logging)

```
use VinkiusLabs\WatchdogDiscord\Facades\WatchdogDiscord;

// Log exceptions with context
try {
    $result = $riskyOperation->execute();
} catch (\Exception $e) {
    WatchdogDiscord::send($e, 'error', [
        'operation' => 'payment_processing',
        'user_id' => auth()->id()
    ]);
    throw $e;
}

// Log custom messages
WatchdogDiscord::sendLog('warning', 'High memory usage detected', [
    'memory_usage' => memory_get_usage(true),
    'peak_memory' => memory_get_peak_usage(true)
]);
```

### Log Levels Support

[](#log-levels-support)

The package supports all PSR-3 log levels with intelligent severity scoring:

```
// Emergency level (severity: 10)
WatchdogDiscord::emergency('Database server down');

// Alert level (severity: 9)
WatchdogDiscord::alert('Payment gateway unreachable');

// Critical level (severity: 8)
WatchdogDiscord::critical('Application crashed');

// Error level (severity: 6)
WatchdogDiscord::error('User authentication failed');

// Warning level (severity: 4)
WatchdogDiscord::warning('High memory usage');

// Notice level (severity: 2)
WatchdogDiscord::notice('New admin user created');

// Info level (severity: 1)
WatchdogDiscord::info('Backup completed successfully');

// Debug level (severity: 1)
WatchdogDiscord::debug('Cache warming started');
```

**Configuration**: Control which log levels are sent to Discord:

```
# Production (critical issues only)
WATCHDOG_DISCORD_LOG_LEVELS=emergency,alert,critical,error
WATCHDOG_DISCORD_MIN_SEVERITY=7

# Development (all levels)
WATCHDOG_DISCORD_LOG_LEVELS=emergency,alert,critical,error,warning,notice,info,debug
WATCHDOG_DISCORD_MIN_SEVERITY=1
```

### Middleware Integration

[](#middleware-integration)

```
// Apply to specific routes
Route::middleware('watchdog-discord:error')->group(function () {
    Route::post('/api/payments', [PaymentController::class, 'process']);
});

// Global middleware (app/Http/Kernel.php)
protected $middleware = [
    \VinkiusLabs\WatchdogDiscord\Middleware\WatchdogDiscordMiddleware::class,
];
```

### Dependency Injection

[](#dependency-injection)

```
use VinkiusLabs\WatchdogDiscord\DiscordNotifier;

class PaymentService
{
    public function __construct(
        private DiscordNotifier $notifier
    ) {}

    public function processPayment($data)
    {
        try {
            return $this->gateway->charge($data);
        } catch (\Exception $e) {
            $this->notifier->send($e, 'critical', [
                'payment_data' => $data,
                'gateway' => $this->gateway->getName()
            ]);
            throw $e;
        }
    }
}
```

Performance Optimization
------------------------

[](#performance-optimization)

### Redis Configuration

[](#redis-configuration)

For optimal performance, configure Redis connection:

```
// config/database.php
'redis' => [
    'default' => [
        'host' => env('REDIS_HOST', '127.0.0.1'),
        'port' => env('REDIS_PORT', '6379'),
        'database' => env('REDIS_DB', '0'),
    ],
],
```

### Queue Workers

[](#queue-workers)

Configure dedicated queue workers for notifications:

```
# Supervisor configuration
php artisan queue:work redis --queue=watchdog_notifications --sleep=3 --tries=3
```

### Production Settings

[](#production-settings)

```
# Optimal production configuration
WATCHDOG_DISCORD_ASYNC_ENABLED=true
WATCHDOG_DISCORD_QUEUE_CONNECTION=redis
WATCHDOG_DISCORD_CACHE_TTL=300
WATCHDOG_DISCORD_ERROR_TRACKING_ENABLED=true
WATCHDOG_DISCORD_RATE_LIMIT_ENABLED=true
```

Testing
-------

[](#testing)

```
# Test Discord notifications
php artisan watchdog-discord:test --exception

# Test with custom message
php artisan watchdog-discord:test --level=error --message="Test notification"

# Run test suite
composer test

# Code analysis
composer analyse
```

Documentation
-------------

[](#documentation)

- **[Installation Guide](docs/installation.md)** - Detailed installation and setup
- **[Configuration Reference](docs/configuration.md)** - Complete configuration options
- **[Architecture Guide](docs/architecture.md)** - Technical architecture details
- **[Performance Guide](docs/performance.md)** - Production optimization
- **[Examples](docs/examples.md)** - Usage examples and patterns
- **[Troubleshooting](docs/troubleshooting.md)** - Common issues and solutions

Requirements
------------

[](#requirements)

- **PHP**: 8.1, 8.2, or 8.3
- **Laravel**: 9.x, 10.x, 11.x, or 12.x
- **Redis**: 6.0+ (recommended for production)
- **MySQL**: 5.7+ or 8.0+

Security
--------

[](#security)

If you discover a security vulnerability, please send an email to VinkiusLabs at . All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

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

Credits
-------

[](#credits)

- **[Vinkius Labs](https://labs.vinkius.com)** - Package development and maintenance
- **[Contributors](https://github.com/vinkius-labs/watchdog-discord/contributors)** - Community contributions

---

Built with ❤️ by [Vinkius Labs](https://labs.vinkius.com)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance56

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~0 days

Total

8

Last Release

294d ago

### Community

Maintainers

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

---

Top Contributors

[![renatomarinho](https://avatars.githubusercontent.com/u/26571?v=4)](https://github.com/renatomarinho "renatomarinho (23 commits)")

---

Tags

composer-packagediscordhigh-performancelaravellaravel-packagemultilanguagenotificationsproductionwatchdogwebhookslaravelmonitoringnotificationswebhookalertsdiscorderror-tracking

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vinkius-labs-watchdog-discord/health.svg)

```
[![Health](https://phpackages.com/badges/vinkius-labs-watchdog-discord/health.svg)](https://phpackages.com/packages/vinkius-labs-watchdog-discord)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[inspector-apm/inspector-laravel

Code Execution Monitoring, built for developers.

2332.0M2](/packages/inspector-apm-inspector-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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