Skip to content

Commit

Permalink
Merge pull request #296 from EscolaLMS/develop
Browse files Browse the repository at this point in the history
Marge develop into master
  • Loading branch information
qunabu authored Sep 15, 2023
2 parents 566f8c2 + 2d83244 commit ea0b32b
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 9 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"laravel/tinker": "^2.5",
"laravel/ui": "^3.0",
"predis/predis": "^1.1",
"sentry/sentry-laravel": "^2.3",
"sentry/sentry-laravel": "^3.6",
"spatie/laravel-permission": "^3.18",
"staudenmeir/laravel-migration-views": "^1.0"
},
Expand Down
51 changes: 44 additions & 7 deletions config/sentry.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

return [

// @see https://docs.sentry.io/product/sentry-basics/dsn-explainer/
'dsn' => env('SENTRY_LARAVEL_DSN', env('SENTRY_DSN')),

// capture release as git sha
// 'release' => trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')),
// The release version of your application
// Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
'release' => env('SENTRY_RELEASE'),

// When left empty or `null` the Laravel environment will be used
'environment' => env('SENTRY_ENVIRONMENT'),
Expand All @@ -14,17 +16,29 @@
// Capture Laravel logs in breadcrumbs
'logs' => true,

// Capture Laravel cache events in breadcrumbs
'cache' => true,

// Capture storage access as breadcrumbs
'storage' => true,

// Capture Livewire components in breadcrumbs
'livewire' => true,

// Capture SQL queries in breadcrumbs
'sql_queries' => true,

// Capture bindings on SQL queries logged in breadcrumbs
'sql_bindings' => true,
'sql_bindings' => false,

// Capture queue job information in breadcrumbs
'queue_info' => true,

// Capture command information in breadcrumbs
'command_info' => true,

// Capture HTTP client requests information in breadcrumbs
'http_client_requests' => true,
],

'tracing' => [
Expand All @@ -43,15 +57,38 @@
// Capture views as spans
'views' => true,

// Capture storage access as spans
'storage' => true,

// Capture Livewire components as spans
'livewire' => true,

// Capture HTTP client requests as spans
'http_client_requests' => true,

// Capture Redis operations as spans (this enables Redis events in Laravel)
'redis_commands' => env('SENTRY_TRACE_REDIS_COMMANDS', false),

// Try to find out where the Redis command originated from and add it to the command spans
'redis_origin' => true,

// Indicates if the tracing integrations supplied by Sentry should be loaded
'default_integrations' => true,

// Indicates that requests without a matching route should be traced
'missing_routes' => false,

// Indicates if the performance trace should continue after the response has been sent to the user until the application terminates
// This is required to capture any spans that are created after the response has been sent like queue jobs dispatched using `dispatch(...)->afterResponse()` for example
'continue_after_response' => true,
],

// @see: https://docs.sentry.io/platforms/php/configuration/options/#send-default-pii
'send_default_pii' => false,
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#send-default-pii
'send_default_pii' => env('SENTRY_SEND_DEFAULT_PII', false),

'traces_sample_rate' => (float)(env('SENTRY_TRACES_SAMPLE_RATE', 0.0)),
// @see: https://docs.sentry.io/platforms/php/guides/laravel/configuration/options/#traces-sample-rate
'traces_sample_rate' => env('SENTRY_TRACES_SAMPLE_RATE') === null ? null : (float)env('SENTRY_TRACES_SAMPLE_RATE'),

'controllers_base_namespace' => env('SENTRY_CONTROLLERS_BASE_NAMESPACE', 'App\\Http\\Controllers'),
'profiles_sample_rate' => env('SENTRY_PROFILES_SAMPLE_RATE') === null ? null : (float)env('SENTRY_PROFILES_SAMPLE_RATE'),

];
2 changes: 1 addition & 1 deletion docker/conf/php/xxx-devilbox-default-php.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ memory_limit = 2G

; Timeouts
max_execution_time = 120
max_input_time = 120
max_input_time = 3600


; Uploads
Expand Down
3 changes: 3 additions & 0 deletions docker/envs/.env.postgres.develop
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ TRACKER_ENABLED=false

SENTRY_LARAVEL_DSN=
SENTRY_TRACES_SAMPLE_RATE=1
SENTRY_PROFILES_SAMPLE_RATE=1
SENTRY_RELEASE=develop
SENTRY_ENVIRONMENT=staging
3 changes: 3 additions & 0 deletions docker/envs/.env.postgres.prod
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ TRACKER_ENABLED=false

SENTRY_LARAVEL_DSN=
SENTRY_TRACES_SAMPLE_RATE=1
SENTRY_PROFILES_SAMPLE_RATE=1
SENTRY_RELEASE=main
SENTRY_ENVIRONMENT=production
1 change: 1 addition & 0 deletions docker/envs/phpunit.xml.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,5 +198,6 @@
<env name="DB_PASSWORD" value="password"/>
<env name="CONFIG_USE_DATABASE" value="true"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<ini name="memory_limit" value="1024M"/>
</php>
</phpunit>
1 change: 1 addition & 0 deletions docker/envs/phpunit.xml.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -198,5 +198,6 @@
<env name="DB_PASSWORD" value="password" />
<env name="CONFIG_USE_DATABASE" value="true"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<ini name="memory_limit" value="1024M"/>
</php>
</phpunit>
1 change: 1 addition & 0 deletions docker/envs/phpunit.xml.postgres
Original file line number Diff line number Diff line change
Expand Up @@ -198,5 +198,6 @@
<env name="DB_PASSWORD" value="postgres" />
<env name="CONFIG_USE_DATABASE" value="true"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<ini name="memory_limit" value="1024M"/>
</php>
</phpunit>
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,6 @@
<env name="DB_PASSWORD" value="secret" />
<env name="CONFIG_USE_DATABASE" value="true"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<ini name="memory_limit" value="1024M"/>
</php>
</phpunit>

0 comments on commit ea0b32b

Please sign in to comment.