Skip to content

Commit

Permalink
Ako/ use circleci CIRCLE_TAG as version in datadog (#8479)
Browse files Browse the repository at this point in the history
* feat: use CIRCLE_TAG as version in datadog

* feat: update tag name to include the project name
  • Loading branch information
ali-hosseini-deriv committed May 5, 2023
1 parent 8a4fec1 commit 3c4cefc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/core/build/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const plugins = ({ base, is_test_env }) => {
process.env.DATADOG_SESSION_REPLAY_SAMPLE_RATE
),
'process.env.DATADOG_SESSION_SAMPLE_RATE': JSON.stringify(process.env.DATADOG_SESSION_SAMPLE_RATE),
'process.env.CIRCLE_TAG': JSON.stringify(process.env.CIRCLE_TAG),
}),
new CleanWebpackPlugin(),
new CopyPlugin(copyConfig(base)),
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/Utils/Datadog/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const DATADOG_APP_ID = process.env.DATADOG_APPLICATION_ID ?? '';
const DATADOG_CLIENT_TOKEN = process.env.DATADOG_CLIENT_TOKEN ?? '';
const DATADOG_SESSION_SAMPLE_RATE = process.env.DATADOG_SESSION_SAMPLE_RATE ?? 10;
const DATADOG_SESSION_REPLAY_SAMPLE_RATE = process.env.DATADOG_SESSION_REPLAY_SAMPLE_RATE ?? 1;
const CIRCLE_TAG = process.env.CIRCLE_TAG ?? 'NO_VERSION';

datadogRum.init({
applicationId: DATADOG_APP_ID,
Expand All @@ -17,7 +18,7 @@ datadogRum.init({
trackResources: true,
trackLongTasks: true,
defaultPrivacyLevel: 'mask-user-input',
version: '1.0.0',
version: `deriv-app-${CIRCLE_TAG}`,
trackFrustrations: true,
enableExperimentalFeatures: ['clickmap'],
});
Expand Down

1 comment on commit 3c4cefc

@vercel
Copy link

@vercel vercel bot commented on 3c4cefc May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

deriv-app – ./

binary.sx
deriv-app.binary.sx
deriv-app.vercel.app
deriv-app-git-master.binary.sx

Please sign in to comment.