ldc-le-gaulois-pro/config/sentry.php

66 lines
2.1 KiB
PHP
Raw Permalink Normal View History

2023-01-06 09:28:57 +01:00
<?php
return [
'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')),
2023-01-06 09:33:40 +01:00
// The release version of your application.
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')).
2023-01-06 09:28:57 +01:00
'release' => env('SENTRY_RELEASE'),
2023-01-06 09:33:40 +01:00
// When left empty or `null` the Laravel environment will be used.
2023-01-06 09:28:57 +01:00
'environment' => env('SENTRY_ENVIRONMENT'),
'breadcrumbs' => [
2023-01-06 09:33:40 +01:00
// Capture Laravel logs in breadcrumbs.
2023-01-06 09:28:57 +01:00
'logs' => true,
2023-01-06 09:33:40 +01:00
// Capture SQL queries in breadcrumbs.
2023-01-06 09:28:57 +01:00
'sql_queries' => true,
2023-01-06 09:33:40 +01:00
// Capture bindings on SQL queries logged in breadcrumbs.
2023-01-06 09:28:57 +01:00
'sql_bindings' => false,
2023-01-06 09:33:40 +01:00
// Capture queue job information in breadcrumbs.
2023-01-06 09:28:57 +01:00
'queue_info' => true,
2023-01-06 09:33:40 +01:00
// Capture command information in breadcrumbs.
2023-01-06 09:28:57 +01:00
'command_info' => true,
],
'tracing' => [
2023-01-06 09:33:40 +01:00
// Trace queue jobs as their own transactions.
2023-01-06 09:28:57 +01:00
'queue_job_transactions' => env('SENTRY_TRACE_QUEUE_ENABLED', false),
2023-01-06 09:33:40 +01:00
// Capture queue jobs as spans when executed on the sync driver.
2023-01-06 09:28:57 +01:00
'queue_jobs' => true,
2023-01-06 09:33:40 +01:00
// Capture SQL queries as spans.
2023-01-06 09:28:57 +01:00
'sql_queries' => true,
2023-01-06 09:33:40 +01:00
// Try to find out where the SQL query originated from and add it to the query spans.
2023-01-06 09:28:57 +01:00
'sql_origin' => true,
2023-01-06 09:33:40 +01:00
// Capture views as spans.
2023-01-06 09:28:57 +01:00
'views' => true,
2023-01-06 09:33:40 +01:00
// Indicates if the tracing integrations supplied by Sentry should be loaded.
2023-01-06 09:28:57 +01:00
'default_integrations' => true,
2023-01-06 09:33:40 +01:00
// Indicates that requests without a matching route should be traced.
2023-01-06 09:28:57 +01:00
'missing_routes' => false,
],
/**
* @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#send-default-pii.
*/
2023-01-06 09:28:57 +01:00
'send_default_pii' => env('SENTRY_SEND_DEFAULT_PII', false),
/**
* @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#traces-sample-rate.
*/
2023-01-06 09:28:57 +01:00
'traces_sample_rate' => env('SENTRY_TRACES_SAMPLE_RATE') === null ? null : (float)env('SENTRY_TRACES_SAMPLE_RATE'),
'before_send' => [\App\Lib\Helpers\ExceptionsHelper::class, 'sentryEventHandler'],
];