PHPackages                             errorvault/laravel - 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. errorvault/laravel

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

errorvault/laravel
==================

ErrorVault error logging package for Laravel applications

1.4.1(2mo ago)0968MITPHPPHP ^8.1

Since Apr 22Pushed 2mo agoCompare

[ Source](https://github.com/devlabsza/error-vault_laravel)[ Packagist](https://packagist.org/packages/errorvault/laravel)[ RSS](/packages/errorvault-laravel/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (7)Used By (0)

ErrorVault Laravel Package
==========================

[](#errorvault-laravel-package)

Send PHP exceptions to your ErrorVault dashboard for centralized error monitoring with automatic health monitoring and reliability features.

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

[](#installation)

```
composer require errorvault/laravel
```

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

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=errorvault-config
```

Add these environment variables to your `.env` file:

```
ERRORVAULT_ENABLED=true
ERRORVAULT_API_ENDPOINT=https://your-errorvault-portal.com/api/v1/errors
ERRORVAULT_API_TOKEN=your-site-api-token
```

Usage
-----

[](#usage)

Once configured, exceptions are automatically reported to ErrorVault. You can also manually report errors:

```
use ErrorVault\Laravel\Facades\ErrorVault;

// Report a custom error
ErrorVault::reportError('Something went wrong', 'warning', __FILE__, __LINE__);

// Report with additional context
ErrorVault::reportError(
    'Payment failed',
    'critical',
    __FILE__,
    __LINE__,
    ['order_id' => $orderId, 'amount' => $amount]
);

// Manually report an exception
try {
    // risky operation
} catch (\Exception $e) {
    ErrorVault::report($e, ['custom' => 'context']);
}
```

Verify Connection
-----------------

[](#verify-connection)

```
use ErrorVault\Laravel\Facades\ErrorVault;

$result = ErrorVault::verify();

if ($result['success']) {
    echo "Connected to: " . $result['data']['site_name'];
} else {
    echo "Error: " . $result['error'];
}
```

Get Statistics
--------------

[](#get-statistics)

```
$stats = ErrorVault::stats();

if ($stats) {
    echo "Total errors: " . $stats['total_errors'];
    echo "New errors: " . $stats['new_errors'];
}
```

Reliability Features (v1.3.0+)
------------------------------

[](#reliability-features-v130)

### Automatic Heartbeat

[](#automatic-heartbeat)

The package automatically sends a lightweight ping every 5 minutes to keep your site's `last_seen_at` updated in the portal. This prevents your site from appearing offline.

### Connection Failure Tracking

[](#connection-failure-tracking)

All API connection failures are automatically logged with:

- Timestamp and error message
- Consecutive failure counter
- Last 20 failures stored
- Admin notification after 5 consecutive failures

### Artisan Commands

[](#artisan-commands)

**Test Connection**

```
php artisan errorvault:test-connection
```

Tests connectivity to the ErrorVault portal and displays detailed results.

**View Diagnostics**

```
php artisan errorvault:diagnostics
```

Displays comprehensive diagnostics including:

- Configuration status
- Health monitoring settings
- Connection failure history
- Scheduled task information

**Clear Failure Logs**

```
php artisan errorvault:diagnostics --clear-failures
```

Clears all connection failure logs.

**Send Health Report**

```
php artisan errorvault:health-report
```

Manually trigger a health report to the portal.

### Programmatic Access

[](#programmatic-access)

```
use ErrorVault\Laravel\Facades\ErrorVault;

// Test connection
$result = ErrorVault::testConnection();
if ($result['success']) {
    echo "Connection successful!";
}

// Get connection failures
$failures = ErrorVault::getConnectionFailures();
foreach ($failures as $failure) {
    echo $failure['timestamp'] . ': ' . $failure['message'];
}

// Get consecutive failure count
$count = ErrorVault::getConsecutiveFailures();

// Clear failure logs
ErrorVault::clearFailureLog();

// Send heartbeat/ping
ErrorVault::sendPing(); // Non-blocking
ErrorVault::sendPing(true); // Blocking
```

Health Monitoring
-----------------

[](#health-monitoring)

Enable comprehensive server health monitoring:

```
ERRORVAULT_HEALTH_ENABLED=true
ERRORVAULT_CPU_THRESHOLD=80
ERRORVAULT_MEMORY_THRESHOLD=80
ERRORVAULT_REQUEST_RATE_THRESHOLD=1000
ERRORVAULT_HEALTH_INTERVAL=5
```

Health monitoring tracks:

- CPU load and usage
- Memory consumption
- Request rates and traffic spikes
- Disk space
- Potential DDoS attacks

Reports are automatically sent every 5 minutes (configurable) and alerts are triggered when thresholds are exceeded.

Configuration Options
---------------------

[](#configuration-options)

### Basic Options

[](#basic-options)

OptionDescriptionDefault`enabled`Enable/disable reporting`false``api_endpoint`Your ErrorVault API endpoint`''``api_token`Your site's API token`''``send_immediately`Send errors immediately vs batch`true``ignore`Exception classes to ignoreSee config`ignore_patterns`Message patterns to ignore`[]``severity_map`Map exceptions to severities`[]`### Health Monitoring Options

[](#health-monitoring-options)

OptionDescriptionDefault`health_monitoring.enabled`Enable health monitoring`false``health_monitoring.cpu_load_threshold`CPU load alert threshold (%)`80``health_monitoring.memory_threshold`Memory usage alert threshold (%)`80``health_monitoring.request_rate_threshold`Request rate alert (req/min)`1000``health_monitoring.request_spike_multiplier`Traffic spike multiplier`5``health_monitoring.alert_cooldown`Alert cooldown (minutes)`15``health_monitoring.report_interval`Report interval (minutes)`5``health_monitoring.disk_threshold`Disk usage alert threshold (%)`90`Ignoring Exceptions
-------------------

[](#ignoring-exceptions)

Add exceptions to the `ignore` array in `config/errorvault.php`:

```
'ignore' => [
    \App\Exceptions\IgnoredException::class,
],
```

Or use patterns to ignore by message content:

```
'ignore_patterns' => [
    'deprecated',
    'cache miss',
],
```

Scheduled Tasks
---------------

[](#scheduled-tasks)

The package automatically registers the following scheduled tasks:

1. **Heartbeat** (every 5 minutes) - Keeps site active in portal
2. **Health Report** (configurable, default 5 minutes) - Sends health metrics

Ensure your Laravel scheduler is running:

```
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
```

Or use Laravel's queue worker in production.

Version History
---------------

[](#version-history)

- **1.3.0** - Added heartbeat/ping system, connection failure tracking, diagnostics commands, and reliability improvements
- **1.2.0** - Added comprehensive server health monitoring
- **1.1.0** - Enhanced error context and server information
- **1.0.0** - Initial release

License
-------

[](#license)

MIT

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance87

Actively maintained with recent releases

Popularity19

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

Total

6

Last Release

63d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4798577?v=4)[danbaileyza](/maintainers/danbaileyza)[@danbaileyza](https://github.com/danbaileyza)

---

Top Contributors

[![danbaileyza](https://avatars.githubusercontent.com/u/4798577?v=4)](https://github.com/danbaileyza "danbaileyza (8 commits)")

---

Tags

laravelmonitoringerror-reportingdebuggingerror-logging

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/errorvault-laravel/health.svg)

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[kssadi/log-tracker

A powerful, intuitive, and efficient log viewer for Laravel applications.

296.3k](/packages/kssadi-log-tracker)

PHPackages © 2026

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