From 851b43245ee6a1113108b881f3fe3045cfb6dcc6 Mon Sep 17 00:00:00 2001 From: Rachel White Date: Wed, 25 Feb 2026 14:30:42 -0500 Subject: [PATCH 1/3] Set up code for RUM Profiling --- web-backend/server.js | 3 ++- web-frontend/src/services/DatadogRum.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/web-backend/server.js b/web-backend/server.js index d3c40cf3..feed2af4 100644 --- a/web-backend/server.js +++ b/web-backend/server.js @@ -363,7 +363,8 @@ app.use('/api/app/proxy', requireAuth, async (req, res) => { headers: { 'Authorization': `Bearer ${req.session.tokens.access_token}`, 'Content-Type': req.headers['content-type'] || 'application/json', - 'Accept': req.headers.accept || 'application/json' + 'Accept': req.headers.accept || 'application/json', + 'Document Policy': `js-profiling` }, body: req.method !== 'GET' && req.method !== 'HEAD' ? JSON.stringify(req.body) : undefined }) diff --git a/web-frontend/src/services/DatadogRum.js b/web-frontend/src/services/DatadogRum.js index 3590561f..57672df2 100644 --- a/web-frontend/src/services/DatadogRum.js +++ b/web-frontend/src/services/DatadogRum.js @@ -46,6 +46,8 @@ export const initializeDatadogRum = () => { trackLongTasks: true, defaultPrivacyLevel: 'mask-user-input', allowedTracingUrls: [(url) => true], + // for RUM Profiling - currently feature flagged + profilingSampleRate: 100, // TODO - turn this on if we start using the react router! //plugins: [reactPlugin({ router: true })], }); From a354ded894a4d9ac7a979053afa413a284e67e91 Mon Sep 17 00:00:00 2001 From: Rachel White Date: Thu, 26 Feb 2026 15:20:37 -0500 Subject: [PATCH 2/3] accidentally used backticks instead of single quotes idk if it matters but yeah --- web-backend/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-backend/server.js b/web-backend/server.js index feed2af4..a6d545b3 100644 --- a/web-backend/server.js +++ b/web-backend/server.js @@ -364,7 +364,7 @@ app.use('/api/app/proxy', requireAuth, async (req, res) => { 'Authorization': `Bearer ${req.session.tokens.access_token}`, 'Content-Type': req.headers['content-type'] || 'application/json', 'Accept': req.headers.accept || 'application/json', - 'Document Policy': `js-profiling` + 'Document Policy': 'js-profiling' }, body: req.method !== 'GET' && req.method !== 'HEAD' ? JSON.stringify(req.body) : undefined }) From bacc175ba779062a84ac735a89b878548c6f4165 Mon Sep 17 00:00:00 2001 From: Rachel White Date: Thu, 26 Feb 2026 15:40:54 -0500 Subject: [PATCH 3/3] fixed response headers in nginx config --- web-frontend/nginx.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/web-frontend/nginx.conf b/web-frontend/nginx.conf index e8ad8e3b..76f47187 100644 --- a/web-frontend/nginx.conf +++ b/web-frontend/nginx.conf @@ -7,6 +7,7 @@ server { # SPA fallback - return index.html for any unmatched routes location / { try_files $uri $uri/ /index.html; + add_header Document-Policy "js-profiling"; } # Cache static assets