Skip to content

Commit

Permalink
Merge pull request #285 from LinkdropHQ/dev_datadog
Browse files Browse the repository at this point in the history
added datadog
  • Loading branch information
spacehaz authored May 20, 2024
2 parents 06602a2 + 9afb2d6 commit 9cb9d14
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"@auth0/auth0-react": "^2.1.1",
"@coinbase/wallet-sdk": "^3.6.6",
"@craco/craco": "^6.4.0",
"@datadog/browser-logs": "^5.18.0",
"@datadog/browser-rum": "^5.18.0",
"@ledgerhq/connect-kit-loader": "1.1.8",
"@linkdrop/contracts": "^1.2.2",
"@reduxjs/toolkit": "^1.6.2",
Expand Down
37 changes: 36 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ import './index.css'
import App from './components/application'
import reportWebVitals from './reportWebVitals'
import { Auth0Provider } from '@auth0/auth0-react'
const { REACT_APP_AUTH0_DOMAIN, REACT_APP_AUTH0_CLIENT_ID } = process.env
import { datadogRum } from '@datadog/browser-rum'
import { datadogLogs } from '@datadog/browser-logs'

const {
REACT_APP_AUTH0_DOMAIN,
REACT_APP_AUTH0_CLIENT_ID,
REACT_APP_DATADOG_CLIENT_TOKEN,
REACT_APP_DATADOG_APPLICATION_ID
} = process.env

ReactDOM.render(
<React.StrictMode>
Expand All @@ -25,3 +33,30 @@ ReactDOM.render(
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

datadogRum.init({
applicationId: REACT_APP_DATADOG_APPLICATION_ID as string,
clientToken: REACT_APP_DATADOG_CLIENT_TOKEN as string,
// `site` refers to the Datadog site parameter of your organization
// see https://docs.datadoghq.com/getting_started/site/
site: 'us3.datadoghq.com',
service: 'linkdrop-claim-app',
env: '<ENV_NAME>',
// Specify a version number to identify the deployed version of your application in Datadog
// version: '1.0.0',
sessionSampleRate: 100,
sessionReplaySampleRate: 20,
trackUserInteractions: true,
trackResources: true,
trackLongTasks: true,
defaultPrivacyLevel: 'mask-user-input',
trackSessionAcrossSubdomains: true
})

datadogLogs.init({
clientToken: 'pubb53ed516a62131623aa027c21da2a27b',
site: REACT_APP_DATADOG_CLIENT_TOKEN as string,
forwardErrorsToLogs: true,
sessionSampleRate: 100,
trackSessionAcrossSubdomains: true
})
27 changes: 27 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,33 @@
resolved "https://registry.yarnpkg.com/@csstools/normalize.css/-/normalize.css-10.1.0.tgz#f0950bba18819512d42f7197e56c518aa491cf18"
integrity sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==

"@datadog/[email protected]":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@datadog/browser-core/-/browser-core-5.18.0.tgz#4f97a3f7c512210cea94285c690859b0fccc0089"
integrity sha512-ks8XGYgprzUsEpMWZXQafMSR4d5pW3eLxOZNepJHo6CgtCFzPpiclnDoQgFleKs6zoMiVL+5iveyJP7/CFxNsw==

"@datadog/browser-logs@^5.18.0":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@datadog/browser-logs/-/browser-logs-5.18.0.tgz#65124c055c1af6c1c8c97a2a6425deff3b386f53"
integrity sha512-Qy8VkmKXg6lkNLr+PyFkB9OuuZh8auQ62DqzM8cNxas0GHCVGmCn+hyBlb9Bnfwu/kNdbci6guQXCRpPnZMgsg==
dependencies:
"@datadog/browser-core" "5.18.0"

"@datadog/[email protected]":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@datadog/browser-rum-core/-/browser-rum-core-5.18.0.tgz#ae0100d4cccb004f9188bd770ed4eee4ada4d257"
integrity sha512-aJuYE4KXF++ZsOaYBo9/HVk25r/5oxzK9+2hRlkINllTwtxgmXLcAjBxxaNp88w53E7d8xBVRtDEM1BWouKt2A==
dependencies:
"@datadog/browser-core" "5.18.0"

"@datadog/browser-rum@^5.18.0":
version "5.18.0"
resolved "https://registry.yarnpkg.com/@datadog/browser-rum/-/browser-rum-5.18.0.tgz#0c11649f14070e8e7f9a12a1c1cae4bd90cdddda"
integrity sha512-D7OtvRvWnLA+Vdc/VI2vLYMKAbGZsLoI4B2ETkESOdxtxjcmaipgn1+h7jl9YJmD6ojxCBZusrRW7YaxWW1ZnA==
dependencies:
"@datadog/browser-core" "5.18.0"
"@datadog/browser-rum-core" "5.18.0"

"@emotion/babel-plugin@^11.10.6":
version "11.10.6"
resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.10.6.tgz#a68ee4b019d661d6f37dec4b8903255766925ead"
Expand Down

0 comments on commit 9cb9d14

Please sign in to comment.