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

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

bluecapapps/downctl-laravel
===========================

Laravel integration for the Downctl error and metrics reporting API.

v1.0.1(2w ago)01↓100%MITPHPPHP ^8.2

Since May 25Pushed 2w agoCompare

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

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

bluecapapps/downctl-laravel
===========================

[](#bluecapappsdownctl-laravel)

Laravel integration for the Downctl error and metrics reporting API. It adds automatic exception capture, a Facade, queue support, and an Artisan health-check command.

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

[](#requirements)

- PHP 8.2+
- Laravel 10, 11, 12, or 13
- `curl` extension

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

[](#installation)

```
composer require bluecapapps/downctl-laravel
```

The service provider and `Downctl` facade are registered automatically via Laravel's package auto-discovery.

### Publish the config file

[](#publish-the-config-file)

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

This creates `config/downctl.php` in your application.

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

[](#configuration)

Add your server-side API key to `.env`:

```
DOWNCTL_API_KEY=your-secret-api-key
```

Downctl reports are always sent to `https://downctl.com`; there is no URL setting to configure.

KeyEnv variableDefaultDescription`api_key``DOWNCTL_API_KEY``null`Server-side secret key`public_key``DOWNCTL_PUBLIC_KEY``null`Public key for frontend JS use`silent``DOWNCTL_SILENT``true`Swallow transport errors`queue``DOWNCTL_QUEUE``false`Report asynchronously via a queue job`capture_level``DOWNCTL_CAPTURE_LEVEL``error`Minimum log level to auto-capture`redact_context``DOWNCTL_REDACT_CONTEXT``true`Redact sensitive context values`redacted_value`-`[REDACTED]`Replacement for redacted values`max_context_depth`-`8`Maximum nested context depth`redacted_keys`-see configContext keys redacted at any nesting levelIf `DOWNCTL_API_KEY` is missing, automatic capture is skipped so a newly installed application will not crash before credentials are configured.

### Verify your setup

[](#verify-your-setup)

```
php artisan downctl:test
```

This pings Downctl and sends a test `info` report.

Usage
-----

[](#usage)

### Facade

[](#facade)

```
use Bluecapapps\DownctlLaravel\Facades\Downctl;

Downctl::captureException($e);

Downctl::report('Stripe webhook signature invalid', level: 'error');

Downctl::captureException($e, level: 'warning', context: [
    'user_id' => auth()->id(),
    'plan' => $user->plan,
]);
```

### Dependency injection

[](#dependency-injection)

The underlying client is bound as a singleton and can be injected anywhere:

```
use Bluecapapps\DownctlLaravel\DownctlClient;

class PaymentService
{
    public function __construct(private DownctlClient $downctl) {}

    public function charge(Order $order): void
    {
        try {
            $this->gateway->charge($order);
        } catch (\Throwable $e) {
            $this->downctl->captureException($e, context: ['order_id' => $order->id]);
            throw $e;
        }
    }
}
```

Automatic Capture
-----------------

[](#automatic-capture)

The package listens to Laravel's `MessageLogged` event and forwards any log entry at or above `capture_level` to Downctl. No changes to your exception handler are required.

Laravel uses the full PSR-3 scale (`debug`, `info`, `notice`, `warning`, `error`, `critical`, `alert`, `emergency`). Downctl accepts three levels, so the listener normalizes them:

Laravel log levelReported as`error`, `critical`, `alert`, `emergency``error``warning``warning``info`, `notice`, `debug``info`Capture only `error` and above:

```
DOWNCTL_CAPTURE_LEVEL=error
```

Capture `warning` and above:

```
DOWNCTL_CAPTURE_LEVEL=warning
```

Disable automatic capture entirely:

```
DOWNCTL_CAPTURE_LEVEL=
```

With capture disabled you can still call `Downctl::captureException()` manually.

### Context redaction

[](#context-redaction)

Report context is redacted by default before it is sent to Downctl. When `DOWNCTL_QUEUE=true`, context is redacted before the queued job is stored, so queue payloads do not contain the original sensitive values.

Downctl assumes encrypted transport and trusted source and destination systems, so the default redaction policy preserves troubleshooting detail such as user IDs, order IDs, route names, statuses, and email addresses. It redacts high-confidence secret keys such as `password`, `access_token`, `refresh_token`, `api_key`, `authorization`, `cookie`, `client_secret`, `session_id`, and `private_key`. Matching is case-insensitive and applies at any nesting level. You can customize the list in `config/downctl.php`.

Context objects are always normalized before sending, even when `redact_context` is disabled. Laravel `Arrayable` objects and `JsonSerializable` objects are converted and redacted recursively, `Stringable` objects are sent as strings, and other objects are summarized by class name. Deeply nested context is bounded by `max_context_depth`.

Log messages and stack traces are sent as-is. Avoid placing secrets directly in log message text or exception messages.

Queue Support
-------------

[](#queue-support)

```
DOWNCTL_QUEUE=true
```

When enabled, the `CaptureLoggedError` listener dispatches a `SendDownctlReport` job instead of making a direct HTTP call. The job retries 3 times with a 30-second backoff.

You must have a working queue driver configured. The `sync` driver sends reports immediately, the same as `DOWNCTL_QUEUE=false`.

Troubleshooting
---------------

[](#troubleshooting)

### `downctl:test` reports "Health check failed"

[](#downctltest-reports-health-check-failed)

- Confirm `DOWNCTL_API_KEY` is set.
- Check that the app can reach `https://downctl.com/api/v1/health`.
- Set `DOWNCTL_SILENT=false` locally if you want transport failures to throw.

### Errors are not appearing in Downctl

[](#errors-are-not-appearing-in-downctl)

1. Run `php artisan downctl:test`.
2. Check `DOWNCTL_CAPTURE_LEVEL`.
3. Make sure `DOWNCTL_API_KEY` is set.
4. If `DOWNCTL_QUEUE=true`, make sure your queue worker is running.

### Reports appear in Downctl but are missing stack traces

[](#reports-appear-in-downctl-but-are-missing-stack-traces)

Laravel only includes the `exception` key in the log context when you use `Log::error('message', ['exception' => $e])` or when the exception handler logs it. If you call `Log::error('message')` without an exception object, no stack trace is available. Use `Downctl::captureException($e)` directly when you have a `Throwable`.

### Auto-discovery is not registering the provider

[](#auto-discovery-is-not-registering-the-provider)

Check that `dont-discover` in your `composer.json` does not include `bluecapapps/downctl-laravel`. If you've disabled auto-discovery project-wide, register the provider manually:

```
// bootstrap/providers.php (Laravel 11+)
return [
    Bluecapapps\DownctlLaravel\DownctlServiceProvider::class,
];
```

```
// config/app.php (Laravel 10)
'providers' => [
    Bluecapapps\DownctlLaravel\DownctlServiceProvider::class,
],
```

Running the tests
-----------------

[](#running-the-tests)

```
composer install
./vendor/bin/pest
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance97

Actively maintained with recent releases

Popularity2

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

Total

2

Last Release

16d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11a98fe4920fac9ad3bd71350d545c595bf7b6e2a8568326fc1c9261d5279df2?d=identicon)[mgibson-bca](/maintainers/mgibson-bca)

---

Top Contributors

[![mgibson-bca](https://avatars.githubusercontent.com/u/264159736?v=4)](https://github.com/mgibson-bca "mgibson-bca (3 commits)")

###  Code Quality

TestsPest

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

88011.3M149](/packages/spatie-laravel-health)[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

9782.1M153](/packages/laravel-ai)[illuminate/log

The Illuminate Log package.

6425.0M597](/packages/illuminate-log)[moonshine/moonshine

Laravel administration panel

1.3k239.9k72](/packages/moonshine-moonshine)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

719160.4k12](/packages/tallstackui-tallstackui)

PHPackages © 2026

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