Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/binary-com/deriv-app into…
Browse files Browse the repository at this point in the history
… shahzaib/KYC-1/error-handling-for-onfido-flow
  • Loading branch information
shahzaib-deriv committed May 11, 2023
2 parents f5b8fb9 + 62bd456 commit 44635a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ permissions:

name: 'Close stale issues and PRs'
on:
workflow_dispatch:
schedule:
- cron: '30 1 * * *'
- cron: '0 0 * * *'

jobs:
stale:
Expand All @@ -14,5 +15,11 @@ jobs:
- uses: actions/stale@v8
with:
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity. Please reopen it if needed.'
close-pr-message: 'This PR was closed because it has been stalled for 5 days with no activity. Please reopen it if needed.'
days-before-stale: 60
days-before-close: 5
ascending: true
operations-per-run: 200

5 changes: 4 additions & 1 deletion packages/core/src/Utils/Datadog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,29 @@ const isStaging = process.env.CIRCLE_JOB === 'release_staging';
let dataDogSessionSampleRate = 0;
let dataDogSessionReplaySampleRate = 0;
let dataDogVersion = '';
let dataDogEnv = '';
let serviceName = '';

if (isProduction) {
serviceName = 'app.deriv.com';
dataDogVersion = `deriv-app-${process.env.CIRCLE_TAG}`;
dataDogSessionReplaySampleRate = +process.env.DATADOG_SESSION_REPLAY_SAMPLE_RATE! ?? 1;
dataDogSessionSampleRate = +process.env.DATADOG_SESSION_SAMPLE_RATE! ?? 10;
dataDogEnv = 'production';
} else if (isStaging) {
serviceName = 'staging-app.deriv.com';
dataDogVersion = `deriv-app-staging-v${formatDate(new Date(), 'YYYYMMDD')}-${formatTime(Date.now(), 'HH:mm')}`;
dataDogSessionReplaySampleRate = 100;
dataDogSessionSampleRate = 100;
dataDogEnv = 'staging';
}

datadogRum.init({
applicationId: isStaging || isProduction ? DATADOG_APP_ID : '',
clientToken: isStaging || isProduction ? DATADOG_CLIENT_TOKEN : '',
site: 'datadoghq.com',
service: serviceName,
env: 'production',
env: dataDogEnv,
sessionSampleRate: dataDogSessionSampleRate,
sessionReplaySampleRate: dataDogSessionReplaySampleRate,
trackUserInteractions: true,
Expand Down

0 comments on commit 44635a3

Please sign in to comment.