Treblle with Laravel
Features
- All Treblle features
- Supports Laravel Vapor and Laravel Octane
Requirements
- PHP 8+
- Laravel 10
Dependencies
Installation
Install Treblle for Laravel via Composer by running the following command in your terminal:
composer require treblle/treblle-laravel
Create an account, login to your existing account, create a new project and get all the .ENV
keys you need to start using Treblle.
You can also visit our website https://app.treblle.com and create a FREE account to get your API key and Project ID. Once
you have them, simply add them to your .ENV
file:
TREBLLE_API_KEY=YOUR_API_KEYTREBLLE_PROJECT_ID=YOUR_PROJECT_ID
Enabling Treblle on your API
NOTE: In case you want to temporarily disable observability, you can do so by setting env as TREBLLE_ENABLE=false
Configuration options
You can configure Treblle using just .env
variables:
TREBLLE_IGNORED_ENV=local,dev,test
Define which environments Treblle should NOT LOG at all. By default, Treblle will log all environments except local, dev and test. If you want to change that you can define your own ignored environments by using a comma separated list, or allow all environments by leaving the value empty.
Masked fields
Treblle masks sensitive information from both the request and response data as well as the request headers data before it even leaves your server. The following parameters are automatically masked: password, pwd, secret, password_confirmation, cc, card_number, ccv, ssn, credit_score.
You can customize this list by editing your configuration file.
Open file config/treblle.php
and tweak the masked fields:
return [ // ...
/* * Define which fields should be masked before leaving the server */ 'masked_fields' => [ 'password', 'pwd', 'secret', 'password_confirmation', 'cc', 'card_number', 'ccv', 'ssn', 'credit_score', 'api_key', ],];