From bcb4245b288e5fc9208d7f8ff53ca5cb1c1e9d0c Mon Sep 17 00:00:00 2001 From: Bobbie Macdonald Date: Tue, 5 Nov 2024 13:39:39 -0400 Subject: [PATCH] :honeybee: collect session replays via Sentry --- package.json | 1 + settings/clientSettings.ts | 1 + site/DonateForm.tsx | 2 +- site/Feedback.tsx | 3 + site/NewsletterSubscription.tsx | 2 +- .../components/DataInsightsNewsletter.tsx | 2 +- site/owid.entry.ts | 40 +++++++ yarn.lock | 103 ++++++++++++++++++ 8 files changed, 151 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 421406175b9..e586d1cb1cd 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "@ourworldindata/types": "workspace:^", "@ourworldindata/utils": "workspace:^", "@react-awesome-query-builder/antd": "^6.6.0", + "@sentry/react": "^8.36.0", "@sinclair/typebox": "^0.28.5", "@slack/web-api": "^7.1.0", "@tippyjs/react": "^4.2.6", diff --git a/settings/clientSettings.ts b/settings/clientSettings.ts index 6c35e45020c..2fbccb0cb4c 100644 --- a/settings/clientSettings.ts +++ b/settings/clientSettings.ts @@ -19,6 +19,7 @@ export const ENV: "development" | "production" = process.env.ENV === "production" ? "production" : "development" export const BUGSNAG_API_KEY: string | undefined = process.env.BUGSNAG_API_KEY +export const SENTRY_DSN: string | undefined = process.env.SENTRY_DSN export const ADMIN_SERVER_PORT: number = parseIntOrUndefined(process.env.ADMIN_SERVER_PORT) ?? 3030 export const ADMIN_SERVER_HOST: string = diff --git a/site/DonateForm.tsx b/site/DonateForm.tsx index 518490a112e..3b5d610f89e 100644 --- a/site/DonateForm.tsx +++ b/site/DonateForm.tsx @@ -320,7 +320,7 @@ export class DonateForm extends React.Component { {this.showOnList && (