Skip to content

Commit

Permalink
Merge pull request #431 from City-of-Helsinki/UHF-8081-add-sentry-to-…
Browse files Browse the repository at this point in the history
…react-apps

UHF-8081: Add sentry env config.
  • Loading branch information
Jussiles authored Sep 11, 2023
2 parents 8441092 + 37fd5c8 commit af1e988
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions public/sites/default/all.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@

// Elastic proxy URL.
$config['elastic_proxy.settings']['elastic_proxy_url'] = getenv('ELASTIC_PROXY_URL');

// Sentry DSN for React.
$config['react_search.settings']['sentry_dsn_react'] = getenv('SENTRY_DSN_REACT');
5 changes: 5 additions & 0 deletions public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ function hdbt_subtheme_preprocess_page__news(array &$variables) {
$variables['#attached']['drupalSettings']['helfi_news_archive']['elastic_proxy_url'] = $config->get('elastic_proxy_url');
}

$react_search_config = \Drupal::config('react_search.settings');
if ($sentry_dsn_react = $react_search_config->get('sentry_dsn_react')) {
$variables['#attached']['drupalSettings']['helfi_react_search']['sentry_dsn_react'] = $sentry_dsn_react;
}

$feed_base_url = Url::fromRoute('view.news_archive.feed_1')->toString();

if ($feed_base_url) {
Expand Down

0 comments on commit af1e988

Please sign in to comment.