Introduction

Ranetrace watches your production apps from both sides. The outside view runs from Ranetrace itself: uptime, response time, certificates, domains, DNS, Lighthouse and broken links on any website, with nothing to install. The inside view needs an SDK in your application, and that is what these pages document.

Which SDK to install

Your application Package Start here
Laravel 11, 12 or 13 ranetrace/ranetrace-laravel Installation
Any other PHP application ranetrace/ranetrace-php PHP installation

Install only one. The Laravel package is the right choice for a Laravel app: it discovers the environment, the project root and the authenticated user from the framework, registers its own routes and commands, and ships page-visit analytics. The framework-agnostic package is for everything else, from a plain PHP site to an application on another framework. It assumes nothing about its host, so a few things the Laravel package can work out for itself are configuration you provide.

Both SDKs capture the JavaScript errors on your frontend. Neither one is a monitoring tool for standalone JavaScript applications.

Features

Feature Laravel SDK PHP SDK Default
Error tracking Yes Yes On
Event tracking Yes Yes On
Centralized logging Yes Yes Off
JavaScript errors Yes Yes Off
Website analytics Yes No Off

Every feature has its own enable flag, so you can adopt them one at a time. Both SDKs also need the master switch: RANETRACE_ENABLED must be true and RANETRACE_KEY must be set before anything is captured.

Website analytics is the one feature the PHP SDK does not have. It depends on request middleware that a framework-agnostic package cannot install for you, so page-visit analytics stays a Laravel feature.

How data is sent

Neither SDK calls the Ranetrace API while it is handling a request. Everything captured is buffered locally first and shipped to the API in batches afterwards, so a slow or unreachable API never slows down your application.

In Laravel, each feature buffers to your cache store (RANETRACE_BATCH_CACHE_DRIVER, Redis by default). The scheduled ranetrace:work command reads the buffers and dispatches batch jobs; a normal queue worker runs them and posts to the API. Two things must be running for data to leave your app:

  1. ranetrace:work scheduled to run regularly (every minute is recommended).
  2. A queue worker on the queue named by RANETRACE_BATCH_QUEUE_NAME (default: default).

Both are covered in The worker.

In plain PHP, there is no cache store and no queue, so the buffer is a file spool on disk and the shipping is done by a flush. A flush runs automatically when the PHP process shuts down, and you can (and on a busy site should) also run vendor/bin/ranetrace-flush from cron every minute. That is covered in PHP installation.

Where to next