PHPackages                             fozimat/laravel-telegram-monitor - 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. fozimat/laravel-telegram-monitor

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

fozimat/laravel-telegram-monitor
================================

Telegram error monitoring package for Laravel applications

v1.1.0(2mo ago)113MITPHPPHP ^8.2

Since May 2Pushed 2mo agoCompare

[ Source](https://github.com/Fozimat/laravel-telegram-monitor)[ Packagist](https://packagist.org/packages/fozimat/laravel-telegram-monitor)[ Docs](https://github.com/fozimat/laravel-telegram-monitor)[ RSS](/packages/fozimat-laravel-telegram-monitor/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Laravel Telegram Monitor
========================

[](#laravel-telegram-monitor)

Lightweight Telegram error monitoring for Laravel applications. This package hooks into Laravel's exception reporting flow and sends important error alerts directly to your Telegram chat or group.

Features
--------

[](#features)

- Zero extra runtime dependencies beyond Laravel's built-in HTTP client
- Laravel package auto-discovery support
- Duplicate error throttling to reduce alert spam
- Respects Laravel's normal exception reporting flow
- Keeps request payloads, headers, and cookies out of Telegram messages

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

[](#requirements)

- PHP 8.2+
- Laravel 10.x, 11.x, 12.x, or 13.x

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

[](#installation)

Install the latest stable release from Packagist:

```
composer require fozimat/laravel-telegram-monitor:^1.0
```

Configuration
-------------

[](#configuration)

The package is auto-discovered by Laravel, so there is no need to register a service provider manually.

Optional: publish the config file if you want to keep package settings in your app config directory:

```
php artisan vendor:publish --tag=telegram-monitor-config
```

Add these variables to your application's `.env` file:

```
ERROR_MONITORING_ENABLED=true
ERROR_MONITORING_CAPTURE_LOGS=true
ERROR_MONITORING_LEVEL=error
TELEGRAM_BOT_TOKEN=1234567890:ABCDefGhIjKlMnOpQrStUvWxYz
TELEGRAM_CHAT_ID=-100123456789
APP_NAME="My Laravel App"
APP_ENV=production
```

`ERROR_MONITORING_LEVEL` works as the minimum threshold for both reported exceptions and Laravel log events. Exceptions handled by this package are treated as `error` severity events, while direct `Log::debug()`, `Log::info()`, `Log::warning()`, `Log::error()`, `Log::critical()`, and similar calls use their actual log level.

`ERROR_MONITORING_CAPTURE_LOGS` controls whether Laravel log events should be forwarded to Telegram. Leave it enabled if you want direct `Log::*` calls to be reported too.

Log levels are applied in this order:

```
debug < info < notice < warning < error < critical < alert < emergency

```

The configured level acts as the minimum threshold, so that level and anything above it will be reported.

Examples:

- `ERROR_MONITORING_LEVEL=debug` reports: `debug`, `info`, `notice`, `warning`, `error`, `critical`, `alert`, `emergency`
- `ERROR_MONITORING_LEVEL=info` reports: `info`, `notice`, `warning`, `error`, `critical`, `alert`, `emergency`
- `ERROR_MONITORING_LEVEL=notice` reports: `notice`, `warning`, `error`, `critical`, `alert`, `emergency`
- `ERROR_MONITORING_LEVEL=warning` reports: `warning`, `error`, `critical`, `alert`, `emergency`
- `ERROR_MONITORING_LEVEL=error` reports: `error`, `critical`, `alert`, `emergency`
- `ERROR_MONITORING_LEVEL=critical` reports: `critical`, `alert`, `emergency`
- `ERROR_MONITORING_LEVEL=alert` reports: `alert`, `emergency`
- `ERROR_MONITORING_LEVEL=emergency` reports: `emergency`

Usage
-----

[](#usage)

After installation and environment setup, the package will automatically send:

- Reportable exceptions from Laravel's exception handler
- Laravel log events such as `Log::error(...)`, `Log::critical(...)`, and `Log::alert(...)` when they pass the configured threshold

Example notification:

```
Laravel Telegram Monitor
Environment: production
Level: ERROR
Time: 2026-05-02 10:30:00
URL: https://example.com/api/v1/sync
User ID: 42
Message: SQLSTATE[HY000] [2002] Connection refused
File: /var/www/app/Services/DatabaseService.php:45

```

Testing
-------

[](#testing)

You can trigger a test exception with a temporary route:

```
use Illuminate\Support\Facades\Route;

Route::get('/test-telegram-error', function () {
    throw new \Exception('This is a test exception for Laravel Telegram Monitor.');
});
```

Visit `/test-telegram-error` and confirm the message arrives in Telegram.

You can also test direct log reporting:

```
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Route;

Route::get('/test-telegram-log', function () {
    Log::error('SSO callback failed.', [
        'message' => 'Invalid OAuth state.',
    ]);

    return 'Log sent.';
});
```

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance84

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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 ~1 days

Total

2

Last Release

82d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43063405?v=4)[Fozimat Amhas](/maintainers/fozimat)[@Fozimat](https://github.com/Fozimat)

---

Top Contributors

[![Fozimat](https://avatars.githubusercontent.com/u/43063405?v=4)](https://github.com/Fozimat "Fozimat (3 commits)")

---

Tags

laravelmonitoringerrorsalertstelegram

### Embed Badge

![Health badge](/badges/fozimat-laravel-telegram-monitor/health.svg)

```
[![Health](https://phpackages.com/badges/fozimat-laravel-telegram-monitor/health.svg)](https://phpackages.com/packages/fozimat-laravel-telegram-monitor)
```

###  Alternatives

[spatie/laravel-flare

Send Laravel errors to Flare

111.4M7](/packages/spatie-laravel-flare)

PHPackages © 2026

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