diff --git a/packages/builder/src/analytics/SentryClient.js b/packages/builder/src/analytics/SentryClient.js deleted file mode 100644 index 2a1f8732e3..0000000000 --- a/packages/builder/src/analytics/SentryClient.js +++ /dev/null @@ -1,37 +0,0 @@ -import * as Sentry from "@sentry/browser" - -export default class SentryClient { - constructor(dsn) { - this.dsn = dsn - } - - init() { - if (this.dsn) { - Sentry.init({ dsn: this.dsn }) - - this.initalised = true - } - } - - /** - * Capture an exception and send it to sentry. - * @param {Error} err - JS error object - */ - captureException(err) { - if (!this.initalised) return - - Sentry.captureException(err) - } - - /** - * Identify user in sentry. - * @param {String} id - Unique user id - */ - identify(id) { - if (!this.initalised) return - - Sentry.configureScope(scope => { - scope.setUser({ id }) - }) - } -} diff --git a/packages/builder/src/analytics/index.js b/packages/builder/src/analytics/index.js index e49ec6d197..cfee9f057e 100644 --- a/packages/builder/src/analytics/index.js +++ b/packages/builder/src/analytics/index.js @@ -1,16 +1,14 @@ import { API } from "api" import PosthogClient from "./PosthogClient" import IntercomClient from "./IntercomClient" -import SentryClient from "./SentryClient" import { Events, EventSource } from "./constants" const posthog = new PosthogClient(process.env.POSTHOG_TOKEN) -const sentry = new SentryClient(process.env.SENTRY_DSN) const intercom = new IntercomClient(process.env.INTERCOM_TOKEN) class AnalyticsHub { constructor() { - this.clients = [posthog, sentry, intercom] + this.clients = [posthog, intercom] } async activate() { @@ -23,12 +21,9 @@ class AnalyticsHub { identify(id) { posthog.identify(id) - sentry.identify(id) } - captureException(err) { - sentry.captureException(err) - } + captureException(err) {} captureEvent(eventName, props = {}) { posthog.captureEvent(eventName, props)