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

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

clawdbot/laravel-monitor
========================

Real-time error monitoring and AI-powered debugging for Laravel applications

v1.0.0(3mo ago)00MITPHPPHP ^8.1

Since Jan 28Pushed 3mo agoCompare

[ Source](https://github.com/impozzible/clawdbot-laravel-monitor)[ Packagist](https://packagist.org/packages/clawdbot/laravel-monitor)[ RSS](/packages/clawdbot-laravel-monitor/feed)WikiDiscussions master Synced 1mo ago

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

Clawdbot Laravel Monitor
========================

[](#clawdbot-laravel-monitor)

Real-time error monitoring, slow query detection, and AI-powered debugging for Laravel applications. Reports issues directly to your Clawdbot instance for automatic analysis, issue creation, and PR generation.

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

[](#installation)

```
composer require clawdbot/laravel-monitor
```

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

[](#configuration)

Publish the config:

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

Add to your `.env`:

```
CLAWDBOT_PROJECT_ID=my-project
CLAWDBOT_WEBHOOK_URL=https://your-clawdbot-gateway/api/monitor
CLAWDBOT_WEBHOOK_SECRET=your-secret-key

# Optional tuning
CLAWDBOT_REPORT_EXCEPTIONS=true
CLAWDBOT_REPORT_SLOW_QUERIES=true
CLAWDBOT_SLOW_QUERY_THRESHOLD=500
CLAWDBOT_REPORT_FAILED_JOBS=true
CLAWDBOT_QUEUE_REPORTS=true
```

Features
--------

[](#features)

### Exception Reporting

[](#exception-reporting)

Automatically catches and reports all unhandled exceptions with full context:

- Stack trace
- Request data (URL, method, input, headers)
- User context (ID, email, name)
- Environment info

```
// Exceptions are reported automatically. To report manually:
use Clawdbot\Monitor\Facades\ClawdbotMonitor;

ClawdbotMonitor::reportException($exception, [
    'custom_context' => 'value',
]);
```

### Slow Query Detection

[](#slow-query-detection)

Monitors all database queries and reports those exceeding the threshold:

```
CLAWDBOT_SLOW_QUERY_THRESHOLD=500  # milliseconds
```

Reports include:

- SQL query with bindings
- Execution time
- Source file/line (where the query originated)
- Connection name

### Failed Job Reporting

[](#failed-job-reporting)

Automatically reports failed queue jobs:

- Job class and payload
- Exception details
- Queue/connection info

### User Complaint API

[](#user-complaint-api)

Built-in API endpoint for users or support to report issues:

```
POST /api/clawdbot/complaint
Authorization: Bearer {token}

{
    "description": "My balance doesn't update after payment",
    "category": "payment",
    "steps": "1. Made a payment via Stripe\n2. Checked balance page\n3. Balance still shows old amount",
    "expected": "Balance should reflect the payment",
    "actual": "Balance unchanged after 10 minutes"
}

```

### Debug API (Optional)

[](#debug-api-optional)

Allow Clawdbot to remotely debug issues:

```
CLAWDBOT_ALLOW_DEBUG_QUERIES=true     # Enable read-only SQL queries
CLAWDBOT_ALLOW_IMPERSONATION=true     # Enable user context lookup
```

Available endpoints (HMAC-signed):

- `POST /api/clawdbot/debug/query` - Execute read-only SELECT queries
- `POST /api/clawdbot/debug/user-context` - Get user info + relationships
- `POST /api/clawdbot/debug/logs` - Read application logs

### Custom Events

[](#custom-events)

Report custom events from anywhere in your app:

```
use Clawdbot\Monitor\Facades\ClawdbotMonitor;

// Payment webhook failed
ClawdbotMonitor::reportEvent('webhook.failed', [
    'provider' => 'stripe',
    'event_type' => 'payment_intent.succeeded',
    'error' => 'Timeout connecting to database',
]);

// Unusual activity
ClawdbotMonitor::reportEvent('security.unusual_login', [
    'user_id' => 123,
    'ip' => '1.2.3.4',
    'country' => 'XX',
]);
```

Testing
-------

[](#testing)

Verify your setup works:

```
php artisan clawdbot:test
php artisan clawdbot:test --type=slow_query
php artisan clawdbot:test --type=failed_job
php artisan clawdbot:test --type=event
```

Security
--------

[](#security)

- All debug endpoints are protected by HMAC signature verification
- Only SELECT queries allowed through the debug API
- Sensitive data (passwords, tokens, API keys) automatically redacted
- IP allowlisting supported for debug endpoints
- Request input sanitized and truncated

Webhook Payload Format
----------------------

[](#webhook-payload-format)

All reports follow this structure:

```
{
    "type": "exception|slow_queries|failed_job|complaint|custom_event|health",
    "project_id": "my-project",
    "environment": "production",
    "server": {
        "hostname": "web-01",
        "ip": "10.0.0.1",
        "php_version": "8.3.0",
        "laravel_version": "11.0.0"
    },
    "timestamp": "2026-01-28T12:00:00.000Z",
    "data": { ... }
}
```

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance80

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

105d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2e77ac8b1d29d49492dda2cfedbba6f35c211e3d1e5d49bdbd5a193a58310d21?d=identicon)[impozzible](/maintainers/impozzible)

---

Tags

laravelmonitoringaidebuggingerrorsclawdbot

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[honeybadger-io/honeybadger-laravel

Honeybadger Laravel integration

431.2M](/packages/honeybadger-io-honeybadger-laravel)[honeybadger-io/honeybadger-php

Honeybadger PHP library

381.5M4](/packages/honeybadger-io-honeybadger-php)[kssadi/log-tracker

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

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

PHPackages © 2026

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