From 4ba05379cfb5f63a56542927666515b5da0ab781 Mon Sep 17 00:00:00 2001 From: "Ali(Ako) Hosseini" Date: Thu, 11 May 2023 12:19:35 +0800 Subject: [PATCH 1/2] Ako/ Distinguish dd staging logs (#8569) * feat: add ability to track staging and production with different service names * ci: fill env value based on the app environment --- packages/core/src/Utils/Datadog/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/Utils/Datadog/index.ts b/packages/core/src/Utils/Datadog/index.ts index ba770d85ad1c..52af8c6d7391 100644 --- a/packages/core/src/Utils/Datadog/index.ts +++ b/packages/core/src/Utils/Datadog/index.ts @@ -9,6 +9,7 @@ const isStaging = process.env.CIRCLE_JOB === 'release_staging'; let dataDogSessionSampleRate = 0; let dataDogSessionReplaySampleRate = 0; let dataDogVersion = ''; +let dataDogEnv = ''; let serviceName = ''; if (isProduction) { @@ -16,11 +17,13 @@ if (isProduction) { 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({ @@ -28,7 +31,7 @@ datadogRum.init({ clientToken: isStaging || isProduction ? DATADOG_CLIENT_TOKEN : '', site: 'datadoghq.com', service: serviceName, - env: 'production', + env: dataDogEnv, sessionSampleRate: dataDogSessionSampleRate, sessionReplaySampleRate: dataDogSessionReplaySampleRate, trackUserInteractions: true, From 62bd456443129c2eb35a69d92453f48f78509d74 Mon Sep 17 00:00:00 2001 From: balakrishna-deriv <56330681+balakrishna-deriv@users.noreply.github.com> Date: Thu, 11 May 2023 13:31:53 +0800 Subject: [PATCH 2/2] Bala/Update messages in stale workflow (#8567) * chore: update stale PR messages * chore: update messages * chore: run at midnight UTC time & sort ascending --- .github/workflows/stale.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 8f317b14b8de..85020f321aa3 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -4,8 +4,9 @@ permissions: name: 'Close stale issues and PRs' on: + workflow_dispatch: schedule: - - cron: '30 1 * * *' + - cron: '0 0 * * *' jobs: stale: @@ -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 +