Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Raygun4Php Laravel Package

mindscape/raygun4php

Raygun4PHP is a PHP client for Raygun error tracking. It captures exceptions and errors, sends stack traces, tags, custom data, and user context, and works with Laravel or plain PHP apps to provide real-time crash reporting and diagnostics.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. mindscape/raygun4php is the vendor's first-party, framework-agnostic PHP client for the Raygun error-monitoring SaaS. It is a thin transport + serialization layer: instantiate a RaygunClient with an API key, then push exceptions, errors, and tagged/custom payloads to Raygun's ingest API over HTTPS. There is no Laravel service provider, no facade, and no config publishing — the package is a library, not a Laravel package. That is actually a reasonable architectural fit: it keeps the dependency at the edge of the app (the exception handler and a small service provider), with no framework coupling, no middleware, and no opinion about how you structure your code. The TPM framing is therefore "buy a monitoring backend, glue it in with ~50 lines of bootstrap code" rather than "adopt a framework integration."

Integration feasibility. High. Composer install, a singleton binding, an env-driven API key, and a call from App\Exceptions\Handler::report() (or a global middleware) gets you coverage. The client supports user context, tags, custom data, and version stamping, which is enough to triage the vast majority of production incidents. Manual instrumentation is required for anything beyond uncaught exceptions — job failures, queue worker crashes, and console commands need explicit reporting. The absence of Laravel package auto-discovery means the integration is explicit and auditable, which is a plus for a platform team.

Technical risk. Low code risk, moderate supply-chain/strategic risk. The library is small and single-purpose; the failure mode of the SDK itself is bounded. The real risks are: (1) vendor concentration — Raygun is the only backend, and pricing, data residency, and retention are contractual, not technical, decisions; (2) maintenance signal — 36 stars and zero dependents is thin community evidence, and the release metadata is unusual (a 2026-10-23 timestamp), so release cadence and PHP-version support must be verified directly on Packagist rather than inferred; (3) ecosystem gravity — Sentry and Bugsnag have deeper Laravel integrations, larger communities, and richer first-party tooling, so choosing Raygun is a deliberate platform bet, not a default. None of these are blockers; they are decision inputs.

Key questions.

  • Is Raygun already licensed, or is this a new vendor relationship? What is the per-event cost curve at our error volume?
  • What are the data residency, PII-scrubbing, and retention obligations, and does the SDK support client-side filtering before transmission?
  • Which PHP and Laravel versions are officially supported, and what is the vendor's stated EOL policy for the SDK?
  • Does the client behave safely under Laravel Octane / long-running workers (connection reuse, memory growth, static state)?
  • What is the sanctioned integration path — raw SDK, or a maintained community Laravel wrapper — and who owns that wrapper?
  • How does the client handle its own failures (Raygun API unreachable, rate-limited, or slow) without impacting request latency or recursing?

Integration Approach

Stack fit. The package slots in cleanly alongside a standard Laravel stack as an observability sink, not a framework dependency. Recommended shape: a RaygunServiceProvider that registers a configured RaygunClient singleton, an App\Exceptions\Handler override that calls report() on the client in addition to (or instead of) the default logger, a small middleware or terminable middleware that attaches the authenticated user and request correlation ID, and an explicit report call in the queue job failure path. Keep the SDK behind a one-method internal interface (e.g., ErrorReporter::report()) so the vendor can be swapped without touching call sites.

Migration path. Run in shadow mode first: report to Raygun while keeping existing logging/APM intact, and compare captured-error volume and grouping quality for two to four weeks. If Raygun is replacing an incumbent (Sentry, Bugsnag, or log-based alerting), migrate the alert routing only after parity on error grouping is demonstrated, and do not remove the incumbent until the team has triaged real incidents using Raygun alone at least twice.

Compatibility. Verify the Composer constraint against the actual PHP runtime matrix across the fleet — mixed-version estates are the most common source of "works in CI, fails on the legacy service" surprises. Confirm the curl extension is present in every runtime image (containers, FPM, CLI, queue workers). Watch for double-reporting if another error handler is registered: multiple handlers compete, and ordering determines who wins. Confirm there is no conflict with existing set_error_handler/set_exception_handler consumers.

Sequencing.

  1. Spike in a single non-critical service: install, bind, report one synthetic exception, confirm payload shape in the Raygun UI.
  2. Add user/tag enrichment and verify PII scrubbing rules before any production traffic.
  3. Instrument the global exception handler and queue failure path; validate against a staging incident drill.
  4. Enable in production for one service; define alert thresholds and on-call routing in Raygun.
  5. Expand service-by-service; document the bootstrap pattern as a shared internal template.
  6. Decommission the incumbent only after a clean parallel-run window.

Operational Impact

Maintenance. The ongoing cost is low but non-zero: pin the version, subscribe to releases, and schedule a quarterly review of the constraint against the PHP upgrade calendar. The integration code (provider + handler + interface) is small enough to be owned by one engineer as a side responsibility. Budget for the Raygun subscription itself as a recurring vendor line item with a defined review point.

Support. Support flows to the vendor. The GitHub issue tracker is low-traffic, which cuts both ways — no noisy community, but also limited peer troubleshooting. Establish a named vendor contact and an escalation path before production dependence; treat the vendor as the tier-2 for SDK defects and the internal platform team as tier-1 for configuration.

Scaling. The client transmits per-event over HTTP; at high error volume this becomes both a latency concern (if synchronous) and a cost concern (per-event pricing). Enable any available asynchronous/batched sending, apply sampling or rate limiting on noisy exception classes, and be explicit about what "capture everything" costs at peak traffic and during an incident storm — error monitors are most valuable exactly when volume spikes. Under Octane or long-running workers, validate that the client does not accumulate per-request state across jobs.

Failure modes. Enumerate and test these: API key missing or rotated → silent loss of visibility; Raygun unreachable → must fail open with bounded timeout, never block the request; handler recursion → the client's own failure must not re-enter error reporting; swallowed fatal errors → shutdown-time errors need explicit handling; and misconfigured filtering → sensitive data leaving the perimeter. Each deserves a runbook entry and a synthetic test in staging.

Ramp-up. A competent Laravel engineer should reach working integration in half a day and production-ready integration in two to three days, with the majority of that time spent on filtering, context enrichment, and alert routing rather than on the SDK. Onboarding documentation should be written internally — do not depend on the upstream README as the team's source of truth — and should cover the shared interface, the env vars, the filtering policy, and the "what to do when Raygun is down" procedure.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core