diff --git a/ui/desktop/package-lock.json b/ui/desktop/package-lock.json index b3e4b6ee..090b160c 100644 --- a/ui/desktop/package-lock.json +++ b/ui/desktop/package-lock.json @@ -11,6 +11,7 @@ "dependencies": { "@ai-sdk/openai": "^0.0.72", "@ai-sdk/ui-utils": "^1.0.2", + "@datadog/browser-rum": "^5.32.0", "@radix-ui/react-avatar": "^1.1.1", "@radix-ui/react-icons": "^1.3.1", "@radix-ui/react-scroll-area": "^1.2.0", @@ -24,7 +25,7 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cors": "^2.8.5", - "dotenv": "^16.4.5", + "dotenv": "^16.4.7", "electron-log": "^5.2.2", "electron-squirrel-startup": "^1.0.1", "express": "^4.21.1", @@ -690,6 +691,39 @@ "node": ">=6.9.0" } }, + "node_modules/@datadog/browser-core": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@datadog/browser-core/-/browser-core-5.32.0.tgz", + "integrity": "sha512-+RnQZRda/XwjP2v8TZHIIbZItS1xlRYVs7OmueaA+/MItj0DiL8hZ4uIj7eLsNUXGS0qsiGHXWkaBZE2HfWuvQ==", + "license": "Apache-2.0" + }, + "node_modules/@datadog/browser-rum": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@datadog/browser-rum/-/browser-rum-5.32.0.tgz", + "integrity": "sha512-Okiu/zTV/sgglGsMAtznqcoy+iwXDjGQ3PkHwZw2jAY/clDcoLbaOPGXeIHXh15E/zk8YALHkC/RW58DFv29lg==", + "license": "Apache-2.0", + "dependencies": { + "@datadog/browser-core": "5.32.0", + "@datadog/browser-rum-core": "5.32.0" + }, + "peerDependencies": { + "@datadog/browser-logs": "5.32.0" + }, + "peerDependenciesMeta": { + "@datadog/browser-logs": { + "optional": true + } + } + }, + "node_modules/@datadog/browser-rum-core": { + "version": "5.32.0", + "resolved": "https://registry.npmjs.org/@datadog/browser-rum-core/-/browser-rum-core-5.32.0.tgz", + "integrity": "sha512-SJb8Qmixc82+m613kR3aO31qOD+EhbVY8eMEJ8hYMs1r0LrWGbmEWFWmA86239W5pD4QyRy9ruvs5O/I0S6c1A==", + "license": "Apache-2.0", + "dependencies": { + "@datadog/browser-core": "5.32.0" + } + }, "node_modules/@electron-forge/cli": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/@electron-forge/cli/-/cli-7.5.0.tgz", @@ -5084,9 +5118,9 @@ "license": "MIT" }, "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "license": "BSD-2-Clause", "engines": { "node": ">=12" diff --git a/ui/desktop/package.json b/ui/desktop/package.json index da0999b8..6c36916f 100644 --- a/ui/desktop/package.json +++ b/ui/desktop/package.json @@ -39,6 +39,7 @@ "dependencies": { "@ai-sdk/openai": "^0.0.72", "@ai-sdk/ui-utils": "^1.0.2", + "@datadog/browser-rum": "^5.32.0", "@radix-ui/react-avatar": "^1.1.1", "@radix-ui/react-icons": "^1.3.1", "@radix-ui/react-scroll-area": "^1.2.0", @@ -52,7 +53,7 @@ "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cors": "^2.8.5", - "dotenv": "^16.4.5", + "dotenv": "^16.4.7", "electron-log": "^5.2.2", "electron-squirrel-startup": "^1.0.1", "express": "^4.21.1", diff --git a/ui/desktop/src/renderer.tsx b/ui/desktop/src/renderer.tsx index 02f2b29b..68713904 100644 --- a/ui/desktop/src/renderer.tsx +++ b/ui/desktop/src/renderer.tsx @@ -3,6 +3,27 @@ import ReactDOM from 'react-dom/client' import { BrowserRouter as Router } from 'react-router-dom' import App from './App' +// Initialize Datadog RUM +import { datadogRum } from '@datadog/browser-rum'; + +const DATADOG_APPLICATION_ID = '139d4946-a1a5-4d5f-b017-2422e7774b9d'; +const DATADOG_CLIENT_TOKEN = 'puba9048a40434f456895695b2d552b9c5c'; +const DATADOG_ENV = 'dev'; + +datadogRum.init({ + applicationId: DATADOG_APPLICATION_ID, + clientToken: DATADOG_CLIENT_TOKEN, + site: 'datadoghq.com', + service: 'goose', + env: DATADOG_ENV, + sessionSampleRate: 100, + sessionReplaySampleRate: 20, + trackUserInteractions: true, + trackResources: true, + trackLongTasks: true, + defaultPrivacyLevel: 'mask-user-input', +}); + ReactDOM.createRoot(document.getElementById('root')!).render(