Events
Laritor offers deep observability into your Laravel applications by automatically tracking a wide range of runtime events. From HTTP requests and exceptions to background jobs and health checks, Laritor captures the most critical insights to help you monitor performance, investigate anomalies, and detect regressions.
You also have full control over what’s recorded. Using Laritor’s customization options, you can filter out unnecessary events, redact sensitive data, and selectively enable high-sensitivity fields like headers and payloads.
Requests
Section titled “Requests”Laritor records every incoming HTTP request, including the route, full URL, IP address, user agent, and the exact date and time the request occurred. Performance data such as request duration, memory usage, and status code are captured automatically. Additionally, Laritor logs the controller that handled the request and the authenticated user, if any.
If you’re using Laravel 11 or higher, the request’s Laravel context is also captured. You can choose to enable more sensitive data points such as the query string, request headers, request payload, response headers, and response body — none of which are collected by default unless explicitly configured in your environment settings.
Commands
Section titled “Commands”All Artisan commands are tracked along with their signature, start time, completion time, and exit code. If you’re on
Laravel 11+, the Laravel context is also attached. Laritor can optionally capture the command output, which is
particularly useful for debugging failed or verbose command runs. Command output can be captured by adding the
BinaryBuilds\LaritorClient\SendOutputToLaritor
trait to your command class.
Scheduled Tasks
Section titled “Scheduled Tasks”For scheduled tasks defined via Laravel’s scheduler, Laritor captures both the task metadata and the execution lifecycle. This includes the cron expression, last run time, and next scheduled run. For each individual run, Laritor logs the scheduled time, when the task actually started and completed, the total duration, exit code, and Laravel context. If enabled, task output is also recorded.
Queued Jobs
Section titled “Queued Jobs”Queued jobs are tracked through their lifecycle — from dispatch to completion. Laritor records the job class, queue name, connection, dispatch time, start and end times, and total duration. It also captures any configured delay and calculates wait time (time between dispatch and execution). Each job is linked back to the event that triggered it — whether that’s a request, command, or another job — and includes Laravel context for deeper traceability.
Exceptions
Section titled “Exceptions”Every exception is captured with its class name, message, file, and line number. The time of occurrence is logged, and the exception is linked to the exact place it was triggered — whether in a request, job, or command. Laritor provides a full stack trace, and each frame includes a snippet of the relevant file to help you quickly identify the root cause.
Queries
Section titled “Queries”Laritor monitors all SQL queries executed by your application. For each query, it logs the raw SQL, the parameter bindings, the file and line of origin, execution timestamp, and duration in milliseconds. Queries are grouped by the parent occurrence (e.g. a request or job), and automatically flagged if they appear to be duplicates or part of an N+1 query pattern.
Outbound Requests
Section titled “Outbound Requests”Every outgoing HTTP request your app makes is tracked, including the target URL, response status code, request timestamp, and total duration. Optional fields — such as request headers, request payload, response body, and response headers — can be enabled if needed. Each outbound request is linked to the Laravel occurrence that triggered it, so you can trace it end-to-end.
Cache Hits
Section titled “Cache Hits”Laritor captures cache hits, logging the cache key, the timestamp of the hit, and the originating occurrence. This helps identify whether your application is relying effectively on caching mechanisms and where cache misses may be impacting performance.
Any log message generated by your Laravel app (via Log::info, Log::error, etc.) is tracked along with the log level, timestamp, and any additional context data. Laritor links each log message to the request, job, or command that produced it, giving you visibility into logs in their proper execution context.
Every outgoing mailable is tracked, including the mailable class, the recipient email address(es), subject line, and the time the message was sent. Laritor also ties each email to the exact request, job, or command that triggered it, so you can understand why and when emails are being dispatched.
Notifications
Section titled “Notifications”Laritor logs all notifications sent via Laravel’s notification system. This includes the notification class, the notifiable entity (such as a user or model), the time of sending, and the event that triggered it. This helps correlate user-facing messages with the exact conditions or failures that led to them.
Server Metrics
Section titled “Server Metrics”If you choose to enable it, Laritor can collect real-time server resource metrics. These include CPU usage percentage, memory usage percentage, and disk space usage. The data is collected by running laritor:send-metrics every minute, which you can schedule using Laravel’s built-in scheduler.
Health Checks
Section titled “Health Checks”Laritor includes built-in health checks to monitor core aspects of your infrastructure. These include checks for queue
backlogs, scheduled task failures, database connectivity, session storage status, cache systems, and filesystem health.
You can also define your own custom health checks using Laritor’s HealthCheck
class.
Each health check runs automatically and logs whether it passed or failed, making it easy to detect system-level issues before they escalate into application failures.
Billing for Events
Section titled “Billing for Events”Laritor bills events based on the amount of data generated, not just the count of requests. Events are measured in 2 KB increments.
- If a request, command, or other event generates less than 2 KB of data, it is billed as 1 event.
- If it generates more than 2 KB, it is billed proportionally in increments of 2 KB.
For example:
- A request that produces 1.5 KB of data is billed as 1 event.
- A request that produces 3 KB of data is billed as 2 events.
- A command that produces 5 KB of data is billed as 3 events.
This ensures that smaller events remain lightweight in cost, while larger, more verbose events (for example, those with verbose logs, or command output) are billed fairly according to their size.
Summary
Section titled “Summary”Laritor gives you complete visibility into your Laravel application without requiring invasive changes. Whether you’re monitoring incoming requests, tracking background jobs, or debugging exceptions and queries, every event is designed to tie back to a specific origin point in your system.
And with flexible filtering and redaction, you remain in full control of what gets collected and how much detail is stored.
Want to control what’s recorded? See the Customization Guide →