From 81984f61974832a7f586794a051bda266557ec7c Mon Sep 17 00:00:00 2001 From: Codel1417 Date: Sun, 15 Sep 2024 13:30:10 -0400 Subject: [PATCH] add sentry replay to dynamic config --- assets/dynamic_config.json | 5 +++-- lib/Backend/dynamic_config.dart | 1 + lib/main.dart | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/assets/dynamic_config.json b/assets/dynamic_config.json index 61fa2214..3dbbee70 100644 --- a/assets/dynamic_config.json +++ b/assets/dynamic_config.json @@ -1,4 +1,5 @@ { - "sentryTraces": 0.5, - "sentryProfiles": 0 + "sentryTraces": 0.8, + "sentryProfiles": 0.1, + "sentryReplay": 0.1 } diff --git a/lib/Backend/dynamic_config.dart b/lib/Backend/dynamic_config.dart index 6a6eb436..6e802c0b 100644 --- a/lib/Backend/dynamic_config.dart +++ b/lib/Backend/dynamic_config.dart @@ -22,6 +22,7 @@ class DynamicConfigInfo with _$DynamicConfigInfo { factory DynamicConfigInfo({ @Default(0.5) double sentryTraces, @Default(0.5) double sentryProfiles, + @Default(0) double sentryReplay, }) = _DynamicConfigInfo; factory DynamicConfigInfo.fromJson(Map json) => _$DynamicConfigInfoFromJson(json); diff --git a/lib/main.dart b/lib/main.dart index 31308ba2..214b9c85 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -122,7 +122,8 @@ Future main() async { ..enableMetrics = true ..attachStacktrace = true ..attachScreenshot = true - ..attachViewHierarchy = true; + ..attachViewHierarchy = true + ..experimental.replay.sessionSampleRate = dynamicConfigInfo.sentryReplay; }, // Init your App. // ignore: missing_provider_scope