Skip to content

Commit

Permalink
Merge pull request #273 from City-of-Helsinki/UHF-9982-js-sentry
Browse files Browse the repository at this point in the history
UHF-9982: Enable raven.settings:javascript_error_handler
  • Loading branch information
hyrsky authored Oct 18, 2024
2 parents 53ffcd3 + 1175fb0 commit ddfa8f0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions public/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ function drupal_get_env(string|array $variables) : mixed {
$default_log_level = getenv('APP_ENV') === 'production' ? 'info' : 'debug';
$settings['helfi_api_base.log_level'] = getenv('LOG_LEVEL') ?: $default_log_level;

// Turn sentry JS error tracking on if SENTRY_DSN_PUBLIC is defined.
if (getenv('SENTRY_DSN_PUBLIC')) {
$config['raven.settings']['javascript_error_handler'] = TRUE;
}

/**
* Deployment identifier.
*
Expand Down

0 comments on commit ddfa8f0

Please sign in to comment.