PHP & Laravel — newinstance/bugwatch-php

Install: composer require newinstance/bugwatch-php · PHP ≥ 8.2 · PSR-18 HTTP client pluggable.

use NewInstance\BugWatch\BugWatch;
BugWatch::init([
  'projectKey' => getenv('BUGWATCH_KEY'),
  'release'    => getenv('APP_VERSION'),
]);

Laravel: the service provider is auto-discovered. Publishes config/bugwatch.php; env keys BUGWATCH_KEY, BUGWATCH_ENDPOINT, BUGWATCH_RELEASE, BUGWATCH_ENABLED, BUGWATCH_SAMPLE_RATE, BUGWATCH_LEVEL. Register BugWatchContextMiddleware for concurrency-safe per-request user scoping (PHP-FPM, Octane, Swoole and queue workers are each handled — see SDK Usage). BrowserSessionController exposes a ready-made session-mint route.

Adapters: Monolog handler, PSR-3 logger, native error handler, Swoole coroutine scope, Testing\InMemoryTransport.

Wire endpoints used: POST /api/v1/bugwatch/ingest (NDJSON), POST /api/v1/bugwatch/browser-session.

Capabilities: exceptions/messages/logs, scopes + fingerprints, redaction, sampling, bounded queue with shutdown flush.