(function () {
    'use strict';

    const moduleDependencies = [
        // Main modules
        'dpHeader',
        'dpPage',
        'dpDetail',
        'dpSearchResults',
        'dpMap',
        'dpStraatbeeld',
        'dpDataSelection',

        // Shared module
        'dpShared',

        // Third party modules
        'angulartics.piwik'
    ];

    /* eslint-disable angular/window-service */
    const Raven = window.Raven;

    const ravenConfig = {
        environment: window.location.hostname
    };

    /* istanbul ignore next */
    if (window.location.hostname !== 'data.amsterdam.nl') {
        ravenConfig.debug = true;
        /* istanbul ignore next */
        ravenConfig.transport = (options) => {
            window.console.info('Raven has been called with the following data: ', options.data);
        };
    }
    /* eslint-enable angular/window-service */

    // Configure Raven (client library for Sentry) and register the ngRaven
    // angular plugin with it. This needs to be done here first, so the atlas
    // module can include ngRaven

    /* istanbul ignore next */
    if (Raven) {
        Raven
            .config('https://e787d53c011243b59ae368a912ee6d3f@sentry.datapunt.amsterdam.nl/2', ravenConfig)
            .addPlugin(Raven.Plugins.Angular)
            .install();
        moduleDependencies.push('ngRaven');
    }

    angular.module('atlas', moduleDependencies);
})();

@@ -343,16 +343,35 @@
 s.piwik'
+,%0A        'ngRaven'
 %0A    %5D;%0A
@@ -575,34 +575,33 @@
 if (
-window.location.hostname !
+ravenConfig.environment =
 == '
@@ -646,211 +646,374 @@
 fig.
-debug = true;%0A        /* istanbul ignore next */%0A        ravenConfig.transport = (options) =%3E %7B%0A            window.console.info('Raven has been called with the following data: ', options.data);%0A        %7D
+sentryEndpoint = 'https://e787d53c011243b59ae368a912ee6d3f@sentry.datapunt.amsterdam.nl/2';%0A    %7D else if (ravenConfig.environment === 'acc.amsterdam.nl') %7B%0A        ravenConfig.sentryEndpoint = 'https://f52176a24eae4ad9acb7acc3fd5f7cdc@sentry.datapunt.amsterdam.nl/4';%0A    %7D else %7B%0A        Raven.setShouldSendCallback(() =%3E false);%0A        Raven.isSetup = () =%3E true
 ;%0A  
@@ -1339,81 +1339,34 @@
 fig(
-'https://e787d53c011243b59ae368a912ee6d3f@sentry.datapunt.amsterdam.nl/2'
+ravenConfig.sentryEndpoint
 , ra
@@ -1450,52 +1450,8 @@
 ();%0A
-        moduleDependencies.push('ngRaven');%0A
     

Configure acceptance environment for Sentry reporting