cinder-laravel maintained by cinderwatch
Cinder Laravel
Develop in the cinder-clients monorepo (
packages/cinder-laravel). This GitHub repository is a read-only split mirror; do not commit here.
Laravel adapter for Cinder — error tracking, logs, performance tracing, health checks, and schedule monitoring.
Full documentation lives on your Cinder instance at /docs (installation, errors, logs, performance, health, schedule monitor, and the versioned API).
composer require cinderwatch/cinder-laravel
CINDER_KEY=your-project-api-token
CINDER_URL=https://cinderwatch.dev
use Cinderwatch\Laravel\Facades\Cinder;
->withExceptions(function (Exceptions $exceptions) {
Cinder::reportExceptions($exceptions);
})
With CINDER_TRACING_ENABLED=true (default), the package records performance spans for web and API requests, queued jobs, Artisan commands, database queries, and outgoing HTTP (Laravel Http, Saloon, and optional Guzzle middleware via OutboundHttpSpans::guzzleMiddleware()) as child spans. See /docs/performance on your Cinder host for sampling and ignore-list options.
Health probes
Enable the pull endpoint polled by Cinder and list the probes to run:
CINDER_HEALTH_ENDPOINT_ENABLED=true
CINDER_HEALTH_CHECK_SECRET=a-long-random-string
// config/cinder.php
use Cinderwatch\Health\Probes\DiskUsageProbe;
use Cinderwatch\Laravel\Health\Probes;
'health' => [
'probes' => [
Probes\DatabaseConnectionProbe::class,
Probes\CacheRoundTripProbe::class,
Probes\QueueConnectionProbe::class,
Probes\DebugModeProbe::class => ['expectEnabled' => false],
Probes\OptimisationProbe::class,
Probes\SchedulerHeartbeatProbe::class => ['maxSilenceMinutes' => 2],
Probes\HorizonProbe::class,
DiskUsageProbe::class => ['path' => '/', 'warnAbovePercent' => 70, 'failAbovePercent' => 90],
],
],
Schedule cinder:health every minute; it stores this server's snapshot and records the scheduler heartbeat (--strict exits non-zero when anything is degraded or failing):
Schedule::command('cinder:health')->everyMinute();
Probes can also be registered in code with Cinder::health()->register(new MyProbe) (any class implementing Cinderwatch\Health\Probe). For multi-server setups, give each server a CINDER_HEALTH_NODE name, share one cache store, and list the other nodes in CINDER_HEALTH_AGGREGATE_NODES on the server that serves the endpoint.