diff --git a/ElementX/Sources/Application/AppCoordinator.swift b/ElementX/Sources/Application/AppCoordinator.swift index 7132be43b..99231e2be 100644 --- a/ElementX/Sources/Application/AppCoordinator.swift +++ b/ElementX/Sources/Application/AppCoordinator.swift @@ -1007,6 +1007,17 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg // Doesn't seem to work at all well with SwiftUI options.enableAutoBreadcrumbTracking = false + // Release health, we want the crash free rates it powers + options.enableAutoSessionTracking = true + + // Off by default but spelled out so a Sentry default flip doesn't silently enable them + options.sessionReplay.sessionSampleRate = 0 + options.sessionReplay.onErrorSampleRate = 0 + options.attachScreenshot = false + options.attachViewHierarchy = false + options.sendDefaultPii = false + options.enableMetricKit = false + // Experimental. Stitches stack traces of asynchronous code together options.swiftAsyncStacktraces = true diff --git a/ElementX/Sources/Services/Analytics/PHGPostHogConfiguration.swift b/ElementX/Sources/Services/Analytics/PHGPostHogConfiguration.swift index 4386c3a03..90f6524c7 100644 --- a/ElementX/Sources/Services/Analytics/PHGPostHogConfiguration.swift +++ b/ElementX/Sources/Services/Analytics/PHGPostHogConfiguration.swift @@ -21,6 +21,15 @@ extension PostHogConfig { // We only want to track the events provided by the AnalyticsEvents package postHogConfiguration.enableSwizzling = false + postHogConfiguration.captureApplicationLifecycleEvents = false + + // We don't use PostHog feature flags, don't fetch them + postHogConfiguration.preloadFeatureFlags = false + + // Off by default but spelled out so a PostHog default flip doesn't silently enable them + postHogConfiguration.sessionReplay = false + postHogConfiguration.captureElementInteractions = false + postHogConfiguration.errorTrackingConfig.autoCapture = false return postHogConfiguration }