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.
Enable / Disable Laritor
Section titled “Enable / Disable Laritor”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
Change Server Name
Section titled “Change Server Name”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
Set Serverless Environment
Section titled “Set Serverless Environment”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
Enable / Disable Recorders
Section titled “Enable / Disable Recorders”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:
'recorders' => [ //Remove any recorders which you do not need]
Record Read Queries
Section titled “Record Read Queries”By default, Laritor captures read-related SQL queries (SELECT, DESCRIBE, EXPLAIN, etc.). To disable recording of read queries, set:
LARITOR_RECORD_READ_QUERIES=false
Record Write Queries
Section titled “Record Write Queries”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
Record Write Queries
Section titled “Record Write Queries”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
Record Query Bindings
Section titled “Record Query Bindings”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
Record Query String Parameters
Section titled “Record Query String Parameters”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
Anonymize Request IP
Section titled “Anonymize Request IP”To prevent Laritor from storing your visitors’ full IP addresses, enable IP anonymization:
LARITOR_ANONYMIZE_IP=true
Anonymize Request User Agent
Section titled “Anonymize Request User Agent”Similarly, to avoid capturing visitors’ full User-Agent strings, enable UA anonymization:
LARITOR_ANONYMIZE_USER_AGENT=true
Anonymize LoggedIn Users
Section titled “Anonymize LoggedIn Users”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
Enable Rate Limits
Section titled “Enable Rate Limits”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=trueLARITOR_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.
Ignore Specific Requests
Section titled “Ignore Specific Requests”To prevent Laritor from recording specific incoming HTTP requests,
add URL patterns to the requests.ignore
array in config/laritor.php
:
'requests' => [ 'ignore' => [ // List of url patterns to ignore ]]
Ignore Specific Outbound Requests
Section titled “Ignore Specific Outbound Requests”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
:
'outbound_requests' => [ 'ignore' => [ // List of url patterns to ignore ]]
Ignore Console Outbound Requests
Section titled “Ignore Console Outbound Requests”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
Ignore Specific Exceptions
Section titled “Ignore Specific Exceptions”To exclude certain exception classes from being reported to Laritor, add them to
the exceptions.ignore
array in config/laritor.php
:
'exceptions' => [ 'ignore' => [ // List of exception classes to ignore ]]
Ignore Specific Jobs
Section titled “Ignore Specific Jobs”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
:
'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!