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

Symfony Rollbar Bundle Laravel Package

oxcom/symfony-rollbar-bundle

Symfony bundle that wires Rollbar error monitoring into your app, reporting exceptions and logs through Symfony's service container. Configure access tokens, environment, and handlers via bundle config, then use the injected logger like any other Symfony service.

View on GitHub
Deep Wiki
Context7

Getting Started

The v2.3.0 release is a maintenance/housekeeping release rather than a feature release, so the first steps are unchanged — but there is one upgrade task you should do before anything else.

  1. Upgrade and clear caches. After composer update for the package, run php artisan config:clear (or bin/console cache:clear) and any config/route caches. Because the bundle "updated configuration to handle the new config of rollbar," stale cached config is the most likely cause of a silently dead integration.
  2. Re-verify your config keys. In a Symfony bundle context, dump the reference config (bin/console config:dump-reference <bundle_alias>) and diff it against your config/packages/*.yaml. In Laravel, compare your config/services.php / published package config file against the package's config/*.php after re-publishing. Keys that no longer exist are typically ignored silently rather than throwing — so a typo or an old key name just means events stop being sent.
  3. Confirm the access token and environment. The most common "it's installed but nothing appears in Rollbar" cause is an empty/incorrect token, or enabled: false in the current env (usually intentional in local/test).
  4. First use case: wire up exception reporting and send one test event. Trigger a deliberate exception in a route/command and confirm it appears in the Rollbar project with the correct environment, code version, and person data. Then send a manual message (e.g. Rollbar::reportMessage('deploy marker', 'info') or the facade equivalent) so you have a known-good baseline for the rest of the assessment.

Where to look first in the codebase: the DI extension / service provider (that is what changed in 2.3.0), the default config file, and the exception listener or Laravel exception-handler hookup.

Implementation Patterns

Centralize reporting behind the framework's handler, not ad-hoc calls. Let uncaught exceptions flow through the framework's exception handler/listener into Rollbar, and reserve manual calls for business-level signals (payment failed, third-party API degraded, queue job retried). This keeps the payload schema consistent and avoids duplicate reports for the same exception.

Attach context at the boundary, not deep in the stack. Set person/request context once — typically in a middleware or a listener on the kernel request event — and let everything downstream inherit it. In Laravel terms: middleware that calls the Rollbar person/context APIs, falling back to null for guests. Deep-nested reportMessage calls with no person data are the most common reason reports are hard to triage.

Treat config as environment-specific. Maintain distinct tokens (or at minimum distinct environment values) per env, and keep enabled false for local and test. When the config schema shifts between releases — as it did in 2.3.0 — this separation makes a broken env obvious without polluting production data.

Use the logging handler for warnings, the reporter for errors. If the package ships a Monolog handler, route warning and above into Rollbar via the log stack rather than sprinkling reportMessage calls. That gives you severity mapping and log-context attachment for free, and keeps handlers swappable.

Async transports belong in production only. Configure the curl/agent transport with a timeout and a bounded queue for production so a Rollbar outage cannot stall request handling; use the synchronous transport in staging so failures surface during testing rather than being swallowed by a full buffer.

Gate reporting on noise level. For high-traffic endpoints, wrap reporting in a rate limiter or check the exception type against an ignore-list (404s, validation exceptions, AuthenticationException). Reporting every 404 is the single fastest way to get your project muted.

Deploy markers are worth the five minutes. Send a message or set a code version on deploy; correlating a spike in errors with a release is far faster than bisecting timestamps.

Gotchas and Tips

  • The 2.3.0 config change is the headline risk. "Updated to handle the new config of rollbar" means key names and/or nesting may have moved to track upstream rollbar-php. Nothing will fail loudly if you keep old keys. Diff your config against the freshly dumped reference on every minor bump of this package, and add a smoke test that asserts an event actually reaches Rollbar in staging.
  • Deprecation fixes target Symfony 4.2+. If you are pinned to an older Symfony (or a Laravel version with a conflicting Symfony dependency chain in require-dev), the deprecation-resolution commit can pull in constraints you cannot satisfy. Check composer why-not before assuming the upgrade is a no-op, and run the full test suite — deprecation removals frequently touch event/listener signatures.
  • Silent failure is the default mode. Nearly every misconfiguration (bad token, wrong key, disabled flag, missing curl extension) degrades to "no events sent" with no exception. Build a /health/rollbar style ping or an artisan/console command that sends a known event, and run it as part of your deploy verification.
  • Payload truncation. Large request bodies, long SQL in exception traces, and deeply nested context get truncated or rejected by the API. Scrub and trim request data (especially Authorization, cookies, and file uploads) in config, not in application code.
  • Scrubbing must cover both fields and query strings. Rollbar's scrubber list handles field names; secrets in URLs (?token=...) need explicit handling or they land in your dashboard.
  • Don't report in tests. Even with enabled: false, a misconfigured CI environment can leak thousands of test exceptions into production. Set the token to an empty value in CI as a second line of defence.
  • Extension points to know: the exception listener/service provider, the config normalizer in the DI extension, and the person/context provider callbacks. These are where you customize behaviour without forking — and where the 2.3.0 config change lives, so read the extension's load()/register() method if your settings appear to be ignored.
  • Debugging checklist: (1) is enabled true for this env? (2) does the dumped reference config contain all your keys? (3) is the token actually set at runtime (config:show / debug:container --parameter)? (4) does a manual reportMessage reach the dashboard? (5) does an uncaught exception reach it? Each step isolates a different layer and will find the problem faster than reading logs.
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.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment