PHPackages                             alby/report - 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. alby/report

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

alby/report
===========

Official Alby error-tracking SDK for PHP. Ships uncaught exceptions, errors, and manual events to your Alby project.

v0.1.0(1mo ago)035↓25%MITPHPPHP ^8.2CI passing

Since Apr 20Pushed 1mo agoCompare

[ Source](https://github.com/alby-sh/alby-sdk-php)[ Packagist](https://packagist.org/packages/alby/report)[ Docs](https://alby.sh)[ RSS](/packages/alby-report/feed)WikiDiscussions main Synced 1w ago

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

alby/report
===========

[](#albyreport)

[![Packagist](https://camo.githubusercontent.com/760d4e97a4bb45e5b49e4d42298e6362b23de5af828c16c649883260463cfec4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c62792f7265706f72742e7376673f636f6c6f723d346635643935266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/alby/report)[![Packagist downloads](https://camo.githubusercontent.com/f4a16cb95966f0b91aa47e69c830ee6c9ec912b0fecfcce8ab1daff0931a23be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c62792f7265706f72742e7376673f636f6c6f723d346635643935)](https://packagist.org/packages/alby/report)[![PHP](https://camo.githubusercontent.com/789539bd4a4abd5b74b6d2bdcb405a17793f4ea82ffc318bc81cba52a7262757/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f616c62792f7265706f72742e7376673f636f6c6f723d373737626234266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/alby/report)[![CI](https://github.com/alby-sh/alby-sdk-php/actions/workflows/ci.yml/badge.svg)](https://github.com/alby-sh/alby-sdk-php/actions/workflows/ci.yml)[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](./LICENSE)

Official [Alby](https://alby.sh) error-tracking SDK for PHP 8.2+.

Captures uncaught exceptions, errors, and anything you explicitly report, then ships them to your Alby project where an AI agent can auto-open a fix task.

Install
-------

[](#install)

```
composer require alby/report
```

Requires PHP 8.2+, `ext-curl`, `ext-json`. No other runtime dependencies.

Use
---

[](#use)

```
use Alby\Report\Alby;

Alby::init([
    'dsn'         => getenv('ALBY_DSN'),  // https://@alby.sh/ingest/v1/
    'release'     => '1.4.2',
    'environment' => 'production',
]);

// Uncaught exceptions and fatal errors are sent automatically.

// Manual report:
try {
    doThing();
} catch (\Throwable $e) {
    Alby::captureException($e);
}

// Non-error events:
Alby::captureMessage('Failed to acquire lease', 'warning');

// Enrich the scope:
Alby::setUser(['id' => 'u_412', 'email' => 'ada@example.com']);
Alby::setTag('region', 'eu-west-3');
Alby::setContext('billing_tenant', ['plan' => 'pro', 'seats' => 12]);
Alby::addBreadcrumb(['type' => 'http', 'message' => 'GET /api/orders/42']);

// Before exit (e.g. in a worker):
Alby::flush(2000);
```

The SDK buffers events in memory and ships them on `flush()` or at `register_shutdown_function` time. Sending is synchronous with a bounded queue of 100 events; long-running workers should call `Alby::flush()` at the end of each unit of work.

Laravel
-------

[](#laravel)

The package auto-discovers its service provider, so nothing else is needed on Laravel 5.5+. Publish the config:

```
php artisan vendor:publish --tag=alby-report-config
```

Then set your DSN in `.env`:

```
ALBY_DSN=https://@alby.sh/ingest/v1/
ALBY_RELEASE=1.4.2

```

### Reporting exceptions

[](#reporting-exceptions)

**Laravel 11+ (`bootstrap/app.php`):**

```
->withExceptions(function (Exceptions $exceptions) {
    $exceptions->report(fn (\Throwable $e) => \Alby\Report\Alby::captureException($e));
})
```

**Laravel ≤10 (`app/Exceptions/Handler.php`):**

```
public function register(): void
{
    $this->reportable(fn (\Throwable $e) => \Alby\Report\Alby::captureException($e));
}
```

### Optional breadcrumbs

[](#optional-breadcrumbs)

In `config/alby-report.php`:

```
'breadcrumbs' => [
    'queries' => true,   // DB query breadcrumbs
    'routes'  => true,   // Route-matched breadcrumbs
],
```

Options
-------

[](#options)

OptionTypeDefaultNotes`dsn``string`— (required)From your Alby app settings.`release``string``''`Build version. Enables release tracking / auto-resolve.`environment``string``APP_ENV` / `production``production` / `staging` / `dev` / anything.`sample_rate``float``1.0`Fraction of events actually sent, 0..1.`server_name``string``gethostname()`Attached to every event.`auto_register``bool``true`Install `set_exception_handler` + `set_error_handler` + `register_shutdown_function`. Chains to existing handlers.`debug``bool``false`SDK diagnostics to stderr.`transport``Transport``CurlTransport`Injectable transport (tests, alt delivery).`breadcrumbs_max``int``100`Ring-buffer cap.Wire protocol
-------------

[](#wire-protocol)

This SDK speaks the [Alby Ingest Protocol v1](./PROTOCOL_V1.md). If you're writing an SDK for a new runtime, start there.

Links
-----

[](#links)

- Website: [alby.sh](https://alby.sh)
- Report issues: [GitHub Issues](https://github.com/alby-sh/alby-sdk-php/issues)
- Other SDKs: [alby-sdk-js](https://github.com/alby-sh/alby-sdk-js) · [alby-sdk-browser](https://github.com/alby-sh/alby-sdk-browser) · [alby-sdk-python](https://github.com/alby-sh/alby-sdk-python)

License
-------

[](#license)

MIT — © Alby.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

50d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/45979126?v=4)[Alberto Pisaroni](/maintainers/albertopisaroni)[@albertopisaroni](https://github.com/albertopisaroni)

---

Top Contributors

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

---

Tags

albyerror-monitoringerror-trackinglaravelobservabilityphpsdklaravelmonitoringsdkexceptionserror-trackingalby

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/alby-report/health.svg)

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

PHPackages © 2026

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