Skip to main content

Reflex

Reflex is an error tracking service that captures, groups, and alerts you to exceptions in your Rails application.

Features

Automatic Capture

Automatically captures unhandled exceptions in Rails

Smart Grouping

Groups similar errors together to reduce noise

Instant Alerts

Get notified via Slack, email, or webhooks

Full Context

See the full stack trace, request, and user context

Quick Start

Errors are captured automatically once the SDK is installed. You can also capture manually:
begin
  # risky code
rescue => e
  BrainzLab::Reflex.capture(e)
  raise
end

With Context

BrainzLab::Reflex.capture(exception,
  user: { id: current_user.id, email: current_user.email },
  tags: { feature: "checkout", version: "v2" }
)

Capture Messages

Capture error-level events without an exception:
BrainzLab::Reflex.capture_message("Something unexpected happened",
  level: :warning,
  extra: { user_id: user.id }
)

Error States

StateDescription
UnresolvedNew errors that need attention
ResolvedFixed errors that shouldn’t recur
IgnoredKnown issues you don’t want alerts for

Automatic Context

Reflex automatically captures:
  • Stack trace - Full backtrace with source code context
  • Request data - URL, method, headers, params
  • User - If set with BrainzLab.set_user
  • Environment - Rails env, Ruby version, gem versions
  • Git - Commit SHA, branch name

Error Grouping

Reflex groups errors by:
  1. Exception class
  2. Location in code (file + line)
  3. Normalized stack trace
This means the same error occurring multiple times shows as one issue with an occurrence count.

Notifications

Configure alerts in the dashboard:
  • Slack - Get notified in your team channel
  • Email - Receive email digests or instant alerts
  • Webhooks - Integrate with any system

Next Steps