rollbar/rollbar

The official Rollbar PHP SDK for error and exception monitoring and reporting.

SDK
Composer
vv4.2.1
337stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
52/100Fair
Development Activity8
Maintenance32
Community88
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture84
Code Quality84
Innovation66
Learning Curve78

rollbar/rollbar is the official PHP SDK for Rollbar, the error-monitoring platform. It captures errors, uncaught exceptions, and log messages from PHP applications and reports them to the Rollbar service, where they are grouped into items, searchable, and routed to notification channels.

The SDK plugs into PHP’s error and exception handlers, implements the PSR-3 logger interface, and includes data scrubbing, payload truncation, telemetry, and configurable senders. It integrates with popular frameworks like Laravel, Symfony, and CodeIgniter, and with platforms such as WordPress and Heroku.

What You Get

  • Automatic capture of uncaught exceptions and PHP errors
  • A PSR-3 compatible RollbarLogger for manual and framework logging
  • Configurable data scrubbing to redact sensitive fields
  • Payload truncation and telemetry support for reliable delivery
  • Framework and platform integrations for Laravel, Symfony, WordPress, and more

Common Use Cases

  • Reporting uncaught exceptions and errors from PHP apps to Rollbar
  • Logging structured occurrences via a PSR-3 logger
  • Scrubbing sensitive data out of error payloads before sending
  • Adding error monitoring to Laravel, Symfony, or WordPress projects

Under The Hood

Architecture - The src/ tree is organized around a central Rollbar/RollbarLogger facade backed by a Config, a DataBuilder that assembles the Payload, and pluggable interfaces for transformation, filtering, serialization, and response handling. Dedicated components handle Scrubber redaction, Truncation of oversized payloads, Handlers for error/exception/fatal hooks, Senders for transport, and a Telemetry subsystem for breadcrumb-style context.

Tech Stack - PHP library autoloaded under the Rollbar\ PSR-4 namespace, implementing the PSR-3 logging interface so it slots into existing logging setups. It uses Psalm for static analysis and PHPUnit for testing, with a Dockerfile for reproducible test environments.

Code Quality - The project is mature with a large contributor base (100+), a comprehensive tests/ suite, a Psalm baseline for static analysis, and interface-driven design (DataBuilderInterface, FilterInterface, ScrubberInterface, SerializerInterface) that keeps components swappable and testable.

API Design - Getting started is a two-step affair: call Rollbar::init(['access_token' => '...']) and errors flow automatically, or use Rollbar::log() / the PSR-3 logger for explicit reporting. The extensive configuration array and EXAMPLES.md, combined with Rollbar’s thorough online documentation and framework guides, make the SDK approachable while still exposing deep customization.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search