Search by

centralog / error-monitoring-laravel

Thejairex

Laravel SDK for Centralog error monitoring. Captures exceptions and sends a copy to your Centralog platform without breaking your app.

Package info

github.com/Thejairex/centralog-sdk

pkg:composer/centralog/error-monitoring-laravel

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-09-30 18:31 UTC

This package is auto-updated.

Last update: 2026-09-30 19:03:55 UTC


README

Laravel SDK for Centralog error monitoring. Captures exceptions and sends a copy to your Centralog platform. Never breaks your app.

Install

composer require centralog/error-monitoring-laravel

Publish the config:

php artisan vendor:publish --provider="Centralog\ErrorMonitoring\CentralogServiceProvider" --tag="centralog-config"

Configure

.env:

CENTRALOG_ENABLED=true
CENTRALOG_ENDPOINT=https://centralog.tudominio.com/api/v1/ingest/events
CENTRALOG_API_KEY=clk_tu_api_key
CENTRALOG_ENVIRONMENT=production
CENTRALOG_RELEASE=2026.09.30.1
CENTRALOG_TIMEOUT=2

Generate the API key in Centralog: Projects → API Keys.

Usage

Report exceptions from your exception handler (bootstrap/app.php):

use Centralog\ErrorMonitoring\Facades\Centralog;
use Illuminate\Foundation\Configuration\Exceptions;
use Throwable;

->withExceptions(function (Exceptions $exceptions): void {
    $exceptions->report(fn (Throwable $e) => Centralog::capture($e));
})

Add extra context anywhere:

Centralog::context(['tenant' => 'acme', 'order_id' => 9182]);

Your local laravel.log keeps working as always — the SDK only sends a copy to Centralog.

Safety

  • Short timeout (2s default), never blocks a request for long.
  • Any network failure is swallowed and logged with Log::debug.
  • Disabled automatically when CENTRALOG_ENABLED=false or endpoint/key are missing.
  • No queue worker required (synchronous by design).

Testing

composer test