PHPackages                             baklysystems/app-watch-laravel-client - 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. baklysystems/app-watch-laravel-client

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

baklysystems/app-watch-laravel-client
=====================================

Self-hosted Laravel monitoring — client package for automatic telemetry collection (exceptions, logs, queries, queues, schedules, HTTP requests, metrics, MySQL health)

v1.0.3(1mo ago)00MITPHPPHP ^8.2

Since Jun 4Pushed 1mo agoCompare

[ Source](https://github.com/baklysystems/app-watch-laravel-client)[ Packagist](https://packagist.org/packages/baklysystems/app-watch-laravel-client)[ RSS](/packages/baklysystems-app-watch-laravel-client/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (16)Versions (5)Used By (0)

App Watch — Laravel Client
==========================

[](#app-watch--laravel-client)

A lightweight, zero-config Composer package that automatically collects telemetry from any Laravel application and sends it to your self-hosted [Appswatch](https://github.com/baklysystems/appswatch) monitoring server.

What It Captures
----------------

[](#what-it-captures)

SurfaceMethodDetails**Exceptions**Event listenerCaptures all unhandled + logged exceptions with stack traces, breadcrumbs, severity mapping**Logs**Monolog handlerBatches log entries (level, context, channel, trace ID)**Database Queries**`DB::listen()`SQL, bindings, duration, slow query detection**Queue Jobs**Job eventsProcessing/completed/failed with attempt tracking and timing**Scheduled Tasks**Schedule eventsStart/completed/failed with output capture and duration**HTTP Requests**MiddlewareMethod, URL, status code, duration, memory, request body (masked)**Custom Metrics**Static collectorGauge, counter, histogram via `MetricCollector`**MySQL Health**`SHOW STATUS`Connections, buffer pool, QPS, replication lag, key cacheInstallation
------------

[](#installation)

```
composer require baklysystems/app-watch-laravel-client
```

Laravel auto-discovery registers the service provider and facade automatically. No manual configuration needed.

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

[](#configuration)

Publish the config file:

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

Set these environment variables in your `.env`:

```
APPSWATCH_SERVER_URL=https://your-appswatch-instance.com
APPSWATCH_API_KEY=your-project-api-key
APPSWATCH_ENABLED=true
APPSWATCH_ENVIRONMENT=production
APPSWATCH_RELEASE=v1.2.3
```

Usage
-----

[](#usage)

**Automatic:** Everything is captured automatically once the package is installed and configured.

**Manual / programmatic** (uses the Facade):

```
use Appswatch;

// Log a custom event
Appswatch::log('info', 'User signed up', ['user_id' => 42]);

// Capture an exception manually
try {
    riskyOperation();
} catch (\Throwable $e) {
    Appswatch::exception($e, ['user_id' => $userId]);
}

// Send a custom metric
Appswatch::metric('users.signed_up', 1, 'count', ['plan' => 'pro']);
```

Custom Job Middleware
---------------------

[](#custom-job-middleware)

Wrap any queued job to capture timing and failures:

```
use BaklySystems\AppWatch\Middleware\AppswatchJobMiddleware;

class MyJob implements ShouldQueue
{
    public function middleware(): array
    {
        return [new AppswatchJobMiddleware];
    }
}
```

Custom Metrics from Your Code
-----------------------------

[](#custom-metrics-from-your-code)

```
use BaklySystems\AppWatch\Collectors\MetricCollector;

MetricCollector::counter('orders.placed', 1, 'count', ['channel' => 'web']);
MetricCollector::gauge('users.active', 150, 'count', ['plan' => 'pro']);
MetricCollector::histogram('api.response_time_ms', 42.5, 'ms', ['endpoint' => '/api/users']);
```

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

[](#architecture)

```
Your Laravel App
     │
     ▼
┌─────────────────────────────────────────────┐
│  Appswatch Package (this)                    │
│                                              │
│  ExceptionCollector ───┐                    │
│  LogCollector ──────────┤                    │
│  QueryCollector ────────┤    ┌────────────┐ │
│  QueueCollector ────────┼───▶│HttpTransport│─┼──▶ Your Appswatch Server
│  ScheduleCollector ─────┤    └────────────┘ │     /api/ingest/*
│  RequestMiddleware ─────┤         │          │
│  MetricCollector ───────┘    (buffered)     │
│  MySqlHealthCollector        retry on fail  │
└─────────────────────────────────────────────┘

```

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

[](#requirements)

- PHP 8.2+
- Laravel 11.x or 12.x
- Guzzle 7
- Monolog 3

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

4

Last Release

49d ago

### Community

Maintainers

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

---

Top Contributors

[![elbakly](https://avatars.githubusercontent.com/u/2504606?v=4)](https://github.com/elbakly "elbakly (5 commits)")

---

Tags

laravelloggingmonitoringapmtelemetryobservabilityerror-trackingappswatch

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/baklysystems-app-watch-laravel-client/health.svg)

```
[![Health](https://phpackages.com/badges/baklysystems-app-watch-laravel-client/health.svg)](https://phpackages.com/packages/baklysystems-app-watch-laravel-client)
```

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[craftcms/cms

Craft CMS

3.6k3.6M3.2k](/packages/craftcms-cms)[flarum/core

Delightfully simple forum software.

211.4M2.4k](/packages/flarum-core)

PHPackages © 2026

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