Product Benefits Pricing Guides Docs About Contact us Try it out
Analytics tools

PostHog Rails Backend Observability Tracking

Track Rails backend errors and jobs behind your mobile app with PostHog. See which properties to capture and how to link them to app funnels.

· 3 min read

Plenty of mobile apps sit on a Rails API. When a request fails in a background job, a Sidekiq worker or an Action Cable channel, the app often shows nothing wrong: the user simply sees a spinner, a missing notification or stale data. Without backend error tracking tied to your product events, those failures never appear in your funnels.

On 17 November 2026, PostHog announced broader opt-in error and log capture for Rails. It covers Action Cable, streaming, rails runner, Active Job retries and selected Sidekiq failures, and it avoids duplicate Sidekiq error reports. The same day, Laravel apps gained opt-in queued event delivery. For mobile teams, the point is that server failures can now sit beside user behaviour.

Why This Matters

Mobile crash reports only cover the client. A failed job that never sends a push notification, or a websocket that drops live updates, is invisible there. If you measure retention without knowing about those failures, you may blame the app design for something the backend caused.

Data Points to Track

Add these properties to backend error and job events:

  • error_class and a short error_message with personal data removed
  • source: controller, active_job, sidekiq, action_cable, rake_or_runner
  • job_name and queue_name
  • retry_count and final_failure: true when retries ran out
  • request_path pattern, not the raw URL with identifiers
  • app_platform and app_version from the calling client
  • feature_name: the product feature the code serves
  • distinct_id of the affected user, where one exists
  • deploy_version or release identifier

Setup Steps

  1. Update the PostHog Rails integration to a release that includes the new capture options.
  2. Enable error and log capture explicitly, since these options are opt-in.
  3. Choose which sources to include. Start with Active Job and Sidekiq, then add Action Cable if you use live updates.
  4. Pass the client’s platform, app version and user ID into the server context at the start of each request.
  5. Tag each job with the product feature it supports.
  6. Scrub messages and parameters so no emails, tokens or free text are stored.
  7. Create an insight that counts failures by feature_name and source.
  8. Join it to your funnels, so you can compare completion for users who hit a failure and those who did not.

Actionable Insights

Retries versus final failures. Jobs that succeed on the second attempt cost you latency. Jobs that exhaust retries cost you users. Alert on the second group.

Failures by app version. If errors cluster on one version, an API change probably broke an older client. Consider a forced update or a compatibility fix.

Features at risk. Rank features by backend failure rate. A feature that fails often but is used rarely may matter less than a small failure rate on checkout.

Impact on retention. Compare day-7 retention for users who saw a failure in their first session and those who did not. The gap shows how much reliability is worth.

After a deploy. Watch the failure rate by deploy_version for the first hour after release.

Keep error text free of personal data, and review your retention settings for logs.