Skip to content

Customization

We designed Laritor to be highly configurable, so it can adapt to your specific needs. If you need a customization not covered here, please reach out to our support team— we’ll do our best to accommodate you.

If you need to pause or disable Laritor without uninstalling the package, set the following environment variable to false. Laritor will stop sending events until you re-enable it.

LARITOR_ENABLED=false

By default, Laritor uses your server’s hostname to identify it in the dashboard. To override this and choose a custom, unique name for each server, set:

LARITOR_SERVER_NAME=your-server-name

If your application runs in a serverless environment (e.g., AWS Lambda, Vapor, etc.), enable this flag so Laritor can correctly track server metrics:

LARITOR_SERVERLESS=true

All recorders are defined in the config/laritor.php file. Laritor will only register the recorders listed in the recorders array. To disable any recorder you don’t need, simply remove it from that list:

config/laritor.php
'recorders' => [
//Remove any recorders which you do not need
]

By default, Laritor captures read-related SQL queries (SELECT, DESCRIBE, EXPLAIN, etc.). To disable recording of read queries, set:

LARITOR_RECORD_READ_QUERIES=false

By default, Laritor captures write-related SQL queries (INSERT, UPDATE, DELETE, TRUNCATE, DROP, etc.). To disable recording of write queries, set:

LARITOR_RECORD_WRITE_QUERIES=false

Laritor records queries executed via the console (scheduled commands, queued jobs, etc.). If you’d prefer not to capture those, set:

LARITOR_RECORD_CONSOLE_QUERIES=false

By default, Laritor does not record query bindings because they often contain sensitive data (and can increase storage usage). If you need to capture bindings, proceed with caution and set:

Warning: Recording query bindings may expose sensitive information.

LARITOR_RECORD_QUERY_BINDINGS=true

By default, Laritor does not record HTTP query strings, request payloads, or response bodies—these can contain PII and increase storage usage. To capture the request’s query string parameters, set:

Warning: Enabling this may expose sensitive information.

LARITOR_RECORD_QUERY_STRING=true

To prevent Laritor from storing your visitors’ full IP addresses, enable IP anonymization:

LARITOR_ANONYMIZE_IP=true

Similarly, to avoid capturing visitors’ full User-Agent strings, enable UA anonymization:

LARITOR_ANONYMIZE_USER_AGENT=true

By default, Laritor collects authenticated users’ names and email addresses. To protect user privacy but still track performance by user ID, Laritor can replace real names/email addresses with placeholders.

For example:

  • User 1 → corresponds to the record with id = 1
  • [email protected] → placeholder email

Enable this behavior by setting:

LARITOR_ANONYMIZE_USER=true

If your event volume is very high and you only need a sample of requests, you can apply a per-URL rate limit. Laritor will record up to N events per URL per minute and drop the rest. For example, to record only 5 requests per URL per minute:

LARITOR_RATE_LIMIT_REQUESTS=true
LARITOR_RATE_LIMIT_REQUESTS_ATTEMPTS=5
  • Note: Rate limiting applies separately to each unique URL. If you receive 10 requests to /api/users and 10 requests to /api/orders in one minute, Laritor will record 5 for /api/users and 5 for /api/orders, for a total of 10 events.

To prevent Laritor from recording specific incoming HTTP requests, add URL patterns to the requests.ignore array in config/laritor.php:

config/laritor.php
'requests' => [
'ignore' => [
// List of url patterns to ignore
]
]

If there are certain outbound HTTP calls you do not want Laritor to monitor, list their URL patterns under outbound_requests.ignore in config/laritor.php:

config/laritor.php
'outbound_requests' => [
'ignore' => [
// List of url patterns to ignore
]
]

By default, Laritor tracks outbound HTTP requests made from console contexts (scheduled jobs, queued tasks, etc.). To disable that, set:

LARITOR_RECORD_CONSOLE_OUTBOUND_REQUESTS=false

To exclude certain exception classes from being reported to Laritor, add them to the exceptions.ignore array in config/laritor.php:

config/laritor.php
'exceptions' => [
'ignore' => [
// List of exception classes to ignore
]
]

If you have certain queued jobs that you don’t want Laritor to monitor, list their class names under jobs.ignore in config/laritor.php:

config/laritor.php
'jobs' => [
'ignore' => [
// List of job classes to ignore
]
]

With these configuration options, you can fine-tune Laritor’s behavior to match your application’s requirements, privacy policies, and performance constraints. If you need further customization, don’t hesitate to contact us!