Configuration
Everything lives in config/larabug.php. Every key can be set from .env where it makes sense to, and the defaults are what most applications want.
Credentials
| Key | Environment variable | Default | What it does |
|---|---|---|---|
dsn |
LB_DSN |
empty | Both keys and the endpoint in one string. Wins over the pair below. |
login_key |
LB_KEY |
empty | The application's ingest key. The option's name is older than the key. |
project_key |
LB_PROJECT_KEY |
empty | Identifies the application. |
server |
LB_SERVER |
https://www.larabug.com/api/log |
Where reports are posted. Change it only for a self-hosted instance. |
verify_ssl |
LB_VERIFY_SSL |
true |
Leave it on. |
What gets reported
| Key | Default | What it does |
|---|---|---|
register_exception_handler |
true |
Whether the package hooks Laravel's exception handler. Off means you report by hand. |
environments |
['production'] |
The only environments that send anything. |
except |
see the file | Exception classes that are never reported. |
blacklist |
see the file | Field names whose values are scrubbed before sending. |
sleep |
60 |
Deduplication window in seconds. The same exception is reported once per window. |
lines_count |
12 |
How many lines of code either side of the failing line are sent. |
project_version |
null |
A version string attached to every report. |
project_version is worth setting. A commented example in the config file reads the short hash of the current commit, which turns "when did this start" into an answer:
'project_version' => trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')),
Run php artisan config:cache on deploy if you do that, or the shell call runs on every request.
The blocks that record something
Most of the file is one block per kind of event, and each has a page of its own under events.
| Block | Page | Default |
|---|---|---|
requests |
Requests | Off |
livewire |
Requests | On, where requests are tracked |
jobs |
Queue jobs | On |
schedule |
Scheduled tasks | Off |
commands |
Commands | Off |
logs |
Logs | On, once the channel is added |
cve |
Dependencies | On |
Caching
config/larabug.php is ordinary Laravel config, so php artisan config:cache applies. Nothing in it is read at a point where caching would break it, provided you clear the cache when you change it.