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

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

signalstack/laravel
===================

Laravel SDK for SignalStack error logging

1.0.0(2mo ago)03↓66.7%MITPHPPHP ^8.1

Since Feb 23Pushed 2mo agoCompare

[ Source](https://github.com/SayefEshan/signal-stack)[ Packagist](https://packagist.org/packages/signalstack/laravel)[ RSS](/packages/signalstack-laravel/feed)WikiDiscussions main Synced 1mo ago

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

SignalStack Laravel SDK
=======================

[](#signalstack-laravel-sdk)

Laravel SDK for sending error logs to a SignalStack server.

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

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12

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

[](#installation)

```
composer require signalstack/laravel
```

Publish the config file:

```
php artisan vendor:publish --tag=signalstack-config
php artisan config:clear
```

---

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

[](#configuration)

Add these variables to your `.env`:

```
SIGNALSTACK_URL=https://your-signalstack-server.com
SIGNALSTACK_API_KEY=your-project-api-key
SIGNALSTACK_ENVIRONMENT=production
SIGNALSTACK_SOURCE=my-app
SIGNALSTACK_LEVEL=warning
SIGNALSTACK_EXCEPTION_HANDLER=true
```

### All available variables

[](#all-available-variables)

VariableDefaultDescription`SIGNALSTACK_URL``http://localhost:8000`Your SignalStack server URL`SIGNALSTACK_API_KEY`—Project API key (from the SignalStack dashboard)`SIGNALSTACK_ENVIRONMENT``APP_ENV` valueEnvironment name sent with each error`SIGNALSTACK_SOURCE``APP_NAME` valueSource identifier sent with each error`SIGNALSTACK_LEVEL``error`Minimum log level to capture (see note below)`SIGNALSTACK_TIMEOUT``5`HTTP request timeout in seconds`SIGNALSTACK_EXCEPTION_HANDLER``true`Auto-capture unhandled exceptions`SIGNALSTACK_QUEUE_ENABLED``false`Send errors via queue (recommended for production)`SIGNALSTACK_QUEUE_CONNECTION``null`Queue connection (`database`, `redis`, etc.)`SIGNALSTACK_QUEUE_NAME``default`Queue name to push jobs onto`SIGNALSTACK_BATCH_ENABLED``false`Accumulate errors and send in batches`SIGNALSTACK_BATCH_SIZE``10`Number of errors per batch> **Important:** `SIGNALSTACK_LEVEL=error` will silently drop `warning`, `notice`, `info`, and `debug` messages. Set to `warning` if you want to capture both warnings and errors.

---

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

[](#verify-connection)

After configuring your `.env`, run:

```
php artisan signalstack:test
```

Expected output:

```
Sending test error to SignalStack...
Test error sent successfully!

```

Check the health of your SignalStack server:

```
php artisan signalstack:health
```

---

Usage
-----

[](#usage)

### Facade

[](#facade)

```
use SignalStack\Laravel\Facades\SignalStack;

SignalStack::error('Something went wrong');
SignalStack::warning('Disk space low', ['free_mb' => 512]);
SignalStack::critical('Database connection failed');
```

### Capturing exceptions

[](#capturing-exceptions)

```
use SignalStack\Laravel\Facades\SignalStack;

try {
    // ...
} catch (\Throwable $e) {
    SignalStack::captureException($e);
}
```

Unhandled exceptions are also captured automatically when `SIGNALSTACK_EXCEPTION_HANDLER=true` (the default).

### As a Laravel log channel

[](#as-a-laravel-log-channel)

Add the channel to `config/logging.php`:

```
'channels' => [
    'signalstack' => [
        'driver' => 'custom',
        'via' => \SignalStack\Laravel\Logging\SignalStackLogChannel::class,
    ],
    'stack' => [
        'driver' => 'stack',
        'channels' => ['daily', 'signalstack'],
    ],
],
```

Now `Log::error(...)` and `Log::warning(...)` automatically forward to SignalStack.

### Artisan commands

[](#artisan-commands)

```
# Send a test error to verify connectivity
php artisan signalstack:test

# Check the health of your SignalStack server
php artisan signalstack:health
```

---

Advanced
--------

[](#advanced)

### Queue mode (recommended for production)

[](#queue-mode-recommended-for-production)

Send errors asynchronously so they don't slow down user requests:

```
SIGNALSTACK_QUEUE_ENABLED=true
SIGNALSTACK_QUEUE_CONNECTION=database
SIGNALSTACK_QUEUE_NAME=default
```

> **Staging vs Production:**
>
> - On **staging** — set `SIGNALSTACK_QUEUE_ENABLED=false`. Errors are sent immediately via HTTP, no queue worker needed.
> - On **production** — set `SIGNALSTACK_QUEUE_ENABLED=true`. Errors are dispatched to the queue and processed by Supervisor in the background, with zero impact on response time.

Make sure the `SIGNALSTACK_QUEUE_NAME` matches the queue your Supervisor worker is listening to.

### Batch mode

[](#batch-mode)

Accumulate errors and send them in a single request instead of one-by-one:

```
SIGNALSTACK_BATCH_ENABLED=true
SIGNALSTACK_BATCH_SIZE=10
```

The batch is flushed automatically when it reaches the configured size, or when the application terminates.

### Minimum log level

[](#minimum-log-level)

Only capture errors at or above a given severity:

```
# Accepted values (low to high): debug, info, notice, warning, error, critical, alert, emergency
SIGNALSTACK_LEVEL=warning
```

### Context collection

[](#context-collection)

Context fields collected automatically with each error (all enabled by default):

```
// config/signalstack.php
'context' => [
    'request_url'     => true,
    'user_id'         => true,
    'ip'              => true,
    'php_version'     => true,
    'laravel_version' => true,
    'hostname'        => true,
],
```

### Safe usage in jobs and background processes

[](#safe-usage-in-jobs-and-background-processes)

When using SignalStack inside queue jobs or any code where it must not affect core logic, use this safe pattern:

```
private function sendWarning(string $message, array $context = []): void
{
    try {
        if (!class_exists('SignalStack\Laravel\Facades\SignalStack')) {
            return;
        }
        $signalStack = 'SignalStack\Laravel\Facades\SignalStack';
        $signalStack::warning($message, $context);
    } catch (\Throwable $e) {
        Log::error('SignalStack failed: ' . $e->getMessage());
    }
}
```

This ensures:

- If the package is not installed → returns silently
- If the SignalStack server is down → caught and logged
- Core business logic is never affected

---

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

[](#troubleshooting)

### `signalstack:test` returns "Failed to send test error"

[](#signalstacktest-returns-failed-to-send-test-error)

- Check `SIGNALSTACK_URL` is reachable from your server: `curl https://your-signalstack-server.com/api/v1/logger/health`
- Check `SIGNALSTACK_API_KEY` matches the project key in the dashboard
- Check the project is active in the SignalStack dashboard

### Warnings are not appearing in the dashboard

[](#warnings-are-not-appearing-in-the-dashboard)

- Check `SIGNALSTACK_LEVEL` — if set to `error`, warnings are silently dropped. Set to `warning`.
- Run `php artisan config:clear` after changing `.env`

### Errors are sent but no Telegram/Slack notification received

[](#errors-are-sent-but-no-telegramslack-notification-received)

- The notification channel may not be linked to the project in the dashboard
- Check the minimum notification level set on the channel (must be ≤ the error level being sent)
- Click **Test Connection** on the channel in the dashboard

### Jobs stuck in queue / notifications delayed

[](#jobs-stuck-in-queue--notifications-delayed)

- Queue worker is not running. Either start it (`php artisan queue:work`) or set `SIGNALSTACK_QUEUE_ENABLED=false`
- Clear stuck jobs: `php artisan queue:clear`
- Check Supervisor is running: `sudo supervisorctl status`

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance84

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

85d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/86c445f3220c3d0168f357fe9ef0d7074b10d3cc28cc05e55050bcfce360b72f?d=identicon)[SayefEshan](/maintainers/SayefEshan)

---

Top Contributors

[![SayefEshan](https://avatars.githubusercontent.com/u/30340315?v=4)](https://github.com/SayefEshan "SayefEshan (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[marvinlabs/laravel-discord-logger

Logging to a discord channel in Laravel

2081.1M2](/packages/marvinlabs-laravel-discord-logger)[larabug/larabug

Laravel 6.x/7.x/8.x/9.x/10.x/11.x/12.x/13.x bug notifier

299549.3k1](/packages/larabug-larabug)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[shaffe/laravel-mail-log-channel

A package to support logging via email in Laravel

1286.2k](/packages/shaffe-laravel-mail-log-channel)

PHPackages © 2026

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