From 9d0b6083b8d82034428975c2a838aeea1937c90f Mon Sep 17 00:00:00 2001 From: Bizz <56281168+dr-bizz@users.noreply.github.com> Date: Tue, 12 Sep 2023 08:33:31 -0400 Subject: [PATCH 01/10] Filter suggestedAmounts to remove zero amounts or empty objects (#1052) * Filter suggested amounts to remove zero amounts or empty objects. * Removed zero amounts initially on giving pages --- .../pageOptionsModal/pageOptions.modal.js | 6 ++--- .../pageOptionsModal/pageOptions.spec.js | 24 ++++++++++++++++++- .../productConfigForm.component.js | 2 +- .../productConfigForm.component.spec.js | 15 +++++++++++- 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/app/designationEditor/pageOptionsModal/pageOptions.modal.js b/src/app/designationEditor/pageOptionsModal/pageOptions.modal.js index 4961ba20c..7f267d22e 100644 --- a/src/app/designationEditor/pageOptionsModal/pageOptions.modal.js +++ b/src/app/designationEditor/pageOptionsModal/pageOptions.modal.js @@ -12,7 +12,7 @@ class ModalInstanceCtrl { this.facebookPixelId = facebookPixelId this.suggestedAmounts = transform(suggestedAmounts, (result, value, key) => { - if (key === 'jcr:primaryType') { return } + if (key === 'jcr:primaryType' || !value?.amount) return result.push({ amount: Number(value.amount), description: value.description, @@ -23,9 +23,9 @@ class ModalInstanceCtrl { } transformSuggestedAmounts () { - return transform(this.suggestedAmounts, (result, value, i) => { + const filterOutZeroAmounts = this.suggestedAmounts.filter((amount) => amount?.amount) + return transform(filterOutZeroAmounts, (result, value, i) => { delete value.order - value.amount = value.amount || 0 result[i + 1] = value }, {}) } diff --git a/src/app/designationEditor/pageOptionsModal/pageOptions.spec.js b/src/app/designationEditor/pageOptionsModal/pageOptions.spec.js index a2d5ca7c4..a465597dc 100644 --- a/src/app/designationEditor/pageOptionsModal/pageOptions.spec.js +++ b/src/app/designationEditor/pageOptionsModal/pageOptions.spec.js @@ -15,7 +15,9 @@ describe('Designation Editor Page Options', function () { facebookPixelId: '635334562464', suggestedAmounts: { 'jcr:primaryType': 'nt:unstructured', 1: { 'jcr:primaryType': 'nt:unstructured', description: '1 Bible', amount: 100 }, - 2: { 'jcr:primaryType': 'nt:unstructured', description: '2 Bibles', amount: 200 } }, + 2: { 'jcr:primaryType': 'nt:unstructured', description: '2 Bibles', amount: 200 }, + 3: { 'jcr:primaryType': 'nt:unstructured', description: '2 Bibles', amount: 0 }, + 4: { }, }, $scope: $scope }) })) @@ -42,4 +44,24 @@ describe('Designation Editor Page Options', function () { 2: { amount: 200, description: '2 Bibles' } }) }) + + it('should remove zero or empty objects', function () { + $ctrl.suggestedAmounts.push({ + amount: 0, + description: '3 Bibles', + }); + $ctrl.suggestedAmounts.push({ + amount: 400, + description: '4 Bibles', + }); + $ctrl.suggestedAmounts.push({ description: '5 Bibles' }); + + expect($ctrl.transformSuggestedAmounts()).toEqual({ + 1: { amount: 100, description: '1 Bible' }, + 2: { amount: 200, description: '2 Bibles' }, + 3: { amount: 400, description: '4 Bibles' } + }) + }) + + }) diff --git a/src/app/productConfig/productConfigForm/productConfigForm.component.js b/src/app/productConfig/productConfigForm/productConfigForm.component.js index 588466480..4d6e3a604 100644 --- a/src/app/productConfig/productConfigForm/productConfigForm.component.js +++ b/src/app/productConfig/productConfigForm/productConfigForm.component.js @@ -138,7 +138,7 @@ class ProductConfigFormController { const suggestedAmountsObservable = this.designationsService.suggestedAmounts(this.code, this.itemConfig) .do(suggestedAmounts => { - this.suggestedAmounts = suggestedAmounts + this.suggestedAmounts = suggestedAmounts.filter((amount) => amount?.amount) this.useSuggestedAmounts = !isEmpty(this.suggestedAmounts) }) diff --git a/src/app/productConfig/productConfigForm/productConfigForm.component.spec.js b/src/app/productConfig/productConfigForm/productConfigForm.component.spec.js index 3eef7f5c4..a7588e5ef 100644 --- a/src/app/productConfig/productConfigForm/productConfigForm.component.spec.js +++ b/src/app/productConfig/productConfigForm/productConfigForm.component.spec.js @@ -161,7 +161,7 @@ describe('product config form component', function () { jest.spyOn($ctrl.commonService, 'getNextDrawDate').mockReturnValue(Observable.of('2016-10-02')) - jest.spyOn($ctrl.designationsService, 'suggestedAmounts').mockReturnValue(Observable.of([{ amount: 5 }, { amount: 10 }])) + jest.spyOn($ctrl.designationsService, 'suggestedAmounts').mockReturnValue(Observable.of([{ amount: 5 }, { amount: 10 }, { amount: 0 }, { }])) jest.spyOn($ctrl.designationsService, 'givingLinks').mockReturnValue(Observable.of([])) jest.spyOn($ctrl.analyticsFactory, 'giveGiftModal').mockReturnValue(() => {}) @@ -231,6 +231,19 @@ describe('product config form component', function () { }) }) + + describe('loadData but suggestedAmounts only has 0 amounts or empty objects', () => { + beforeEach(() => { + jest.spyOn($ctrl.designationsService, 'suggestedAmounts').mockReturnValue(Observable.of([{ amount: 0 }, { }])) + }) + + it('should use default amounts', () => { + $ctrl.loadData() + expect($ctrl.suggestedAmounts).toEqual([]) + expect($ctrl.useSuggestedAmounts).toEqual(false) + }) + }) + describe('setDefaultAmount', () => { beforeEach(() => { $ctrl.itemConfig = {} From 49664f81dbecd80277c48851c79df90a2c6ab956 Mon Sep 17 00:00:00 2001 From: Caleb Alldrin Date: Tue, 12 Sep 2023 15:00:41 -0700 Subject: [PATCH 02/10] Add datadog rum --- package.json | 1 + src/common/datadog.config.js | 18 ++++++++++++++++++ yarn.lock | 20 ++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 src/common/datadog.config.js diff --git a/package.json b/package.json index 08a5318cb..430e5f851 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "@babel/polyfill": "^7.7.0", "@babel/runtime-corejs2": "^7.0.0", "@cruglobal/cru-payments": "^1.2.4", + "@datadog/browser-rum": "^4.48.2", "angular": "^1.8.2", "angular-cookies": "^1.8.2", "angular-environment": "https://github.com/jonshaffer/angular-environment.git#d3082c06fb16804d324faac9b7e753fd64a44e5d", diff --git a/src/common/datadog.config.js b/src/common/datadog.config.js new file mode 100644 index 000000000..658a61ce2 --- /dev/null +++ b/src/common/datadog.config.js @@ -0,0 +1,18 @@ +import { datadogRum } from '@datadog/browser-rum'; + +datadogRum.init({ + applicationId: '3937053e-386b-4b5b-ab4a-c83217d2f953', + clientToken: process.env.DATADOG_CLIENT_TOKEN, + site: 'datadoghq.com', + service:'give-web', + env: process.env.NODE_ENV, + version: process.env.GITHUB_SHA, + sessionSampleRate:100, + sessionReplaySampleRate: 20, + trackUserInteractions: true, + trackResources: true, + trackLongTasks: true, + defaultPrivacyLevel:'mask-user-input' +}); + +datadogRum.startSessionReplayRecording(); diff --git a/yarn.lock b/yarn.lock index bfa232497..6e66470c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1544,6 +1544,26 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" +"@datadog/browser-core@4.48.2": + version "4.48.2" + resolved "https://registry.yarnpkg.com/@datadog/browser-core/-/browser-core-4.48.2.tgz#6606878660a2dad528a7c5c4aa5465169cb2c33a" + integrity sha512-ewQDLouh9jymJPTRq5M8Hz0FFzMaVlJCwHHY5gMUmGyIaBEzS8wd3AeZ56kQ32ZOcyz83au1/yZ/zcIB8LDoyA== + +"@datadog/browser-rum-core@4.48.2": + version "4.48.2" + resolved "https://registry.yarnpkg.com/@datadog/browser-rum-core/-/browser-rum-core-4.48.2.tgz#4fc13aedc6170d51c3c024327da27af937fd0186" + integrity sha512-LUlaYAC7MGXZbIPT6LvSVxaZBG0irer+meQp1LfJBdSy/lLb4OrNowrc9dcHeh4Fw9rNNLWl2Pz+4dBqRtR87g== + dependencies: + "@datadog/browser-core" "4.48.2" + +"@datadog/browser-rum@^4.48.2": + version "4.48.2" + resolved "https://registry.yarnpkg.com/@datadog/browser-rum/-/browser-rum-4.48.2.tgz#95ab72a0fd6b9f82b69cca6a351d9a91bcd8d5da" + integrity sha512-SGxjKJLUJq8AjWedhHTQicIr4rvAcDMwBr6gHvZr3h9llCBpDxPzd/RPKCK69HMxBGt/Cw7KCpjAjy9IaCURWQ== + dependencies: + "@datadog/browser-core" "4.48.2" + "@datadog/browser-rum-core" "4.48.2" + "@eslint/eslintrc@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.3.0.tgz#d736d6963d7003b6514e6324bec9c602ac340318" From 99dd3aa2831ce930ba376abbc46b4febe46b2bfe Mon Sep 17 00:00:00 2001 From: Caleb Alldrin Date: Wed, 13 Sep 2023 17:18:31 -0700 Subject: [PATCH 03/10] Change rates --- src/common/datadog.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/datadog.config.js b/src/common/datadog.config.js index 658a61ce2..35a1f899b 100644 --- a/src/common/datadog.config.js +++ b/src/common/datadog.config.js @@ -7,8 +7,8 @@ datadogRum.init({ service:'give-web', env: process.env.NODE_ENV, version: process.env.GITHUB_SHA, - sessionSampleRate:100, - sessionReplaySampleRate: 20, + sessionSampleRate: 10, + sessionReplaySampleRate: 1, trackUserInteractions: true, trackResources: true, trackLongTasks: true, From 66fa67b8729d0caa53c69543b7ee5c857ebcfe41 Mon Sep 17 00:00:00 2001 From: Caleb Alldrin Date: Thu, 14 Sep 2023 18:30:38 -0700 Subject: [PATCH 04/10] Move config to app.config and change sample rates --- src/common/app.config.js | 18 ++++++++++++++++++ src/common/datadog.config.js | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 src/common/datadog.config.js diff --git a/src/common/app.config.js b/src/common/app.config.js index c2c0e68e6..cfac8444f 100644 --- a/src/common/app.config.js +++ b/src/common/app.config.js @@ -3,6 +3,7 @@ import 'angular-environment' import 'angular-translate' import rollbarConfig from './rollbar.config' +import { datadogRum } from '@datadog/browser-rum'; const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider, $logProvider, $httpProvider, $locationProvider, $qProvider, $translateProvider) { $httpProvider.useApplyAsync(true) @@ -535,6 +536,23 @@ const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider PREFERRED_RADIO_STATION: 'Preferred Radio Station: ' }) $translateProvider.preferredLanguage('en') + + window.datadogRum && window.datadogRum.init({ + applicationId: '3937053e-386b-4b5b-ab4a-c83217d2f953', + clientToken: process.env.DATADOG_RUM_CLIENT_TOKEN, + site: 'datadoghq.com', + service:'give-web', + env: process.env.NODE_ENV, + version: process.env.GITHUB_SHA, + sessionSampleRate: process.env.NODE_ENV == "staging" ? 100 : 10, + sessionReplaySampleRate: process.env.NODE_ENV == "staging" ? 100 : 1, + trackUserInteractions: true, + trackResources: true, + trackLongTasks: true, + defaultPrivacyLevel:'mask-user-input' +}); + +window.datadogRum && window.datadogRum.startSessionReplayRecording(); } export default angular.module('appConfig', [ diff --git a/src/common/datadog.config.js b/src/common/datadog.config.js deleted file mode 100644 index 35a1f899b..000000000 --- a/src/common/datadog.config.js +++ /dev/null @@ -1,18 +0,0 @@ -import { datadogRum } from '@datadog/browser-rum'; - -datadogRum.init({ - applicationId: '3937053e-386b-4b5b-ab4a-c83217d2f953', - clientToken: process.env.DATADOG_CLIENT_TOKEN, - site: 'datadoghq.com', - service:'give-web', - env: process.env.NODE_ENV, - version: process.env.GITHUB_SHA, - sessionSampleRate: 10, - sessionReplaySampleRate: 1, - trackUserInteractions: true, - trackResources: true, - trackLongTasks: true, - defaultPrivacyLevel:'mask-user-input' -}); - -datadogRum.startSessionReplayRecording(); From d1836b787c02cad5f3b21e4acb72568702d1a3ad Mon Sep 17 00:00:00 2001 From: Caleb Alldrin Date: Thu, 14 Sep 2023 18:40:33 -0700 Subject: [PATCH 05/10] Fix lint issues --- src/common/app.config.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/common/app.config.js b/src/common/app.config.js index cfac8444f..9e39b4b21 100644 --- a/src/common/app.config.js +++ b/src/common/app.config.js @@ -3,7 +3,7 @@ import 'angular-environment' import 'angular-translate' import rollbarConfig from './rollbar.config' -import { datadogRum } from '@datadog/browser-rum'; +// import { datadogRum } from '@datadog/browser-rum' const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider, $logProvider, $httpProvider, $locationProvider, $qProvider, $translateProvider) { $httpProvider.useApplyAsync(true) @@ -541,18 +541,18 @@ const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider applicationId: '3937053e-386b-4b5b-ab4a-c83217d2f953', clientToken: process.env.DATADOG_RUM_CLIENT_TOKEN, site: 'datadoghq.com', - service:'give-web', + service: 'give-web', env: process.env.NODE_ENV, version: process.env.GITHUB_SHA, - sessionSampleRate: process.env.NODE_ENV == "staging" ? 100 : 10, - sessionReplaySampleRate: process.env.NODE_ENV == "staging" ? 100 : 1, + sessionSampleRate: process.env.NODE_ENV === 'staging' ? 100 : 10, + sessionReplaySampleRate: process.env.NODE_ENV === 'staging' ? 100 : 1, trackUserInteractions: true, trackResources: true, trackLongTasks: true, - defaultPrivacyLevel:'mask-user-input' -}); - -window.datadogRum && window.datadogRum.startSessionReplayRecording(); + defaultPrivacyLevel: 'mask-user-input' + }) + + window.datadogRum && window.datadogRum.startSessionReplayRecording() } export default angular.module('appConfig', [ From b7313b2d52887a660ad37521fea174581facfbbb Mon Sep 17 00:00:00 2001 From: Caleb Alldrin Date: Fri, 15 Sep 2023 08:41:57 -0700 Subject: [PATCH 06/10] Add datadogRum to window --- src/common/app.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/app.config.js b/src/common/app.config.js index 9e39b4b21..b5ee96fc2 100644 --- a/src/common/app.config.js +++ b/src/common/app.config.js @@ -3,7 +3,7 @@ import 'angular-environment' import 'angular-translate' import rollbarConfig from './rollbar.config' -// import { datadogRum } from '@datadog/browser-rum' +import { datadogRum } from '@datadog/browser-rum' const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider, $logProvider, $httpProvider, $locationProvider, $qProvider, $translateProvider) { $httpProvider.useApplyAsync(true) @@ -537,6 +537,7 @@ const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider }) $translateProvider.preferredLanguage('en') + window.datadogRum = datadogRum; window.datadogRum && window.datadogRum.init({ applicationId: '3937053e-386b-4b5b-ab4a-c83217d2f953', clientToken: process.env.DATADOG_RUM_CLIENT_TOKEN, From 0906cd97e7b3492d67ab437f6cfd88e305f6352b Mon Sep 17 00:00:00 2001 From: Caleb Alldrin Date: Fri, 15 Sep 2023 08:49:32 -0700 Subject: [PATCH 07/10] Fix lint --- src/common/app.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/app.config.js b/src/common/app.config.js index b5ee96fc2..da0f7ae8f 100644 --- a/src/common/app.config.js +++ b/src/common/app.config.js @@ -537,7 +537,7 @@ const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider }) $translateProvider.preferredLanguage('en') - window.datadogRum = datadogRum; + window.datadogRum = datadogRum window.datadogRum && window.datadogRum.init({ applicationId: '3937053e-386b-4b5b-ab4a-c83217d2f953', clientToken: process.env.DATADOG_RUM_CLIENT_TOKEN, From 3e5d88378c23876d2edf6e905a04f40e3796240b Mon Sep 17 00:00:00 2001 From: Caleb Alldrin Date: Fri, 15 Sep 2023 12:07:40 -0700 Subject: [PATCH 08/10] add datadog client token to webpack config and yml --- .github/workflows/build.yml | 1 + src/common/app.config.js | 1 + webpack.config.js | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8fcee162..f4950e60c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,6 +67,7 @@ jobs: env: S3_GIVE_DOMAIN: //${{ secrets.GIVE_WEB_HOSTNAME }} ROLLBAR_ACCESS_TOKEN: ${{ secrets.ROLLBAR_ACCESS_TOKEN }} + DATADOG_RUM_CLIENT_TOKEN: ${{ secrets.DATADOG_RUM_CLIENT_TOKEN }} run: yarn run build - name: Configure AWS Credentials diff --git a/src/common/app.config.js b/src/common/app.config.js index da0f7ae8f..393dc6714 100644 --- a/src/common/app.config.js +++ b/src/common/app.config.js @@ -554,6 +554,7 @@ const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider }) window.datadogRum && window.datadogRum.startSessionReplayRecording() + console.log('node env: ', process.env.NODE_ENV) } export default angular.module('appConfig', [ diff --git a/webpack.config.js b/webpack.config.js index 7f04c9310..8fb4400af 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -55,7 +55,8 @@ const sharedConfig = { new webpack.EnvironmentPlugin({ GITHUB_SHA: 'development', S3_GIVE_DOMAIN: '', - ROLLBAR_ACCESS_TOKEN: JSON.stringify(process.env.ROLLBAR_ACCESS_TOKEN) || 'development-token' + ROLLBAR_ACCESS_TOKEN: JSON.stringify(process.env.ROLLBAR_ACCESS_TOKEN) || 'development-token', + DATADOG_RUM_CLIENT_TOKEN: process.env.DATADOG_RUM_CLIENT_TOKEN || '' }), // To strip all locales except “en” new MomentLocalesPlugin() From bd9944087e83b5e15441b44a34badcc0c9e74d85 Mon Sep 17 00:00:00 2001 From: Caleb Alldrin Date: Fri, 15 Sep 2023 12:35:37 -0700 Subject: [PATCH 09/10] Move datadog config to a new file --- src/common/app.config.js | 22 ++-------------------- src/common/datadog.config.js | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 src/common/datadog.config.js diff --git a/src/common/app.config.js b/src/common/app.config.js index 393dc6714..59d7c22d8 100644 --- a/src/common/app.config.js +++ b/src/common/app.config.js @@ -3,7 +3,7 @@ import 'angular-environment' import 'angular-translate' import rollbarConfig from './rollbar.config' -import { datadogRum } from '@datadog/browser-rum' +import dataDogConfig from './datadog.config.js' const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider, $logProvider, $httpProvider, $locationProvider, $qProvider, $translateProvider) { $httpProvider.useApplyAsync(true) @@ -536,25 +536,6 @@ const appConfig = /* @ngInject */ function (envServiceProvider, $compileProvider PREFERRED_RADIO_STATION: 'Preferred Radio Station: ' }) $translateProvider.preferredLanguage('en') - - window.datadogRum = datadogRum - window.datadogRum && window.datadogRum.init({ - applicationId: '3937053e-386b-4b5b-ab4a-c83217d2f953', - clientToken: process.env.DATADOG_RUM_CLIENT_TOKEN, - site: 'datadoghq.com', - service: 'give-web', - env: process.env.NODE_ENV, - version: process.env.GITHUB_SHA, - sessionSampleRate: process.env.NODE_ENV === 'staging' ? 100 : 10, - sessionReplaySampleRate: process.env.NODE_ENV === 'staging' ? 100 : 1, - trackUserInteractions: true, - trackResources: true, - trackLongTasks: true, - defaultPrivacyLevel: 'mask-user-input' - }) - - window.datadogRum && window.datadogRum.startSessionReplayRecording() - console.log('node env: ', process.env.NODE_ENV) } export default angular.module('appConfig', [ @@ -563,3 +544,4 @@ export default angular.module('appConfig', [ ]) .config(appConfig) .config(rollbarConfig) + .config(dataDogConfig) diff --git a/src/common/datadog.config.js b/src/common/datadog.config.js new file mode 100644 index 000000000..36ceb652f --- /dev/null +++ b/src/common/datadog.config.js @@ -0,0 +1,26 @@ +import 'angular-environment' +import { datadogRum } from '@datadog/browser-rum' + +const dataDogConfig = /* @ngInject */ function (envServiceProvider) { + const config = { + applicationId: '3937053e-386b-4b5b-ab4a-c83217d2f953', + clientToken: process.env.DATADOG_RUM_CLIENT_TOKEN, + site: 'datadoghq.com', + service: 'give-web', + env: envServiceProvider.get(), + version: process.env.GITHUB_SHA, + sessionSampleRate: envServiceProvider.is('development') ? 100 : 10, + sessionReplaySampleRate: envServiceProvider.is('development') ? 100 : 1, + trackUserInteractions: true, + trackResources: true, + trackLongTasks: true, + defaultPrivacyLevel: 'mask-user-input' + } + + window.datadogRum = datadogRum + window.datadogRum && window.datadogRum.init(config) + window.datadogRum && window.datadogRum.startSessionReplayRecording() +} +export { + dataDogConfig as default +} From b1912acaab4a140fa23d98d73d4c4e9d9fff8d99 Mon Sep 17 00:00:00 2001 From: Caleb Alldrin Date: Fri, 15 Sep 2023 12:54:36 -0700 Subject: [PATCH 10/10] change sample rate on staging --- src/common/datadog.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/datadog.config.js b/src/common/datadog.config.js index 36ceb652f..935458bc1 100644 --- a/src/common/datadog.config.js +++ b/src/common/datadog.config.js @@ -9,8 +9,8 @@ const dataDogConfig = /* @ngInject */ function (envServiceProvider) { service: 'give-web', env: envServiceProvider.get(), version: process.env.GITHUB_SHA, - sessionSampleRate: envServiceProvider.is('development') ? 100 : 10, - sessionReplaySampleRate: envServiceProvider.is('development') ? 100 : 1, + sessionSampleRate: envServiceProvider.is('staging') ? 100 : 10, + sessionReplaySampleRate: envServiceProvider.is('staging') ? 100 : 1, trackUserInteractions: true, trackResources: true, trackLongTasks: true,