diff --git a/app/sites/[id]/settings/page.tsx b/app/sites/[id]/settings/page.tsx index e4e0881..87a8d83 100644 --- a/app/sites/[id]/settings/page.tsx +++ b/app/sites/[id]/settings/page.tsx @@ -24,8 +24,8 @@ import { LockClosedIcon, } from '@radix-ui/react-icons' -/** Sampling rate steps (every 10%): 10, 20, …, 100. */ -const SAMPLING_RATE_OPTIONS = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100] as const +/** Sampling rate options: 25, 50, 75, 100. */ +const SAMPLING_RATE_OPTIONS = [25, 50, 75, 100] as const function snapSamplingRate(v: number): number { return (SAMPLING_RATE_OPTIONS as readonly number[]).reduce( @@ -921,50 +921,26 @@ export default function SiteSettingsPage() { {/* Sampling Rate */}
-
+

Sampling Rate

Percentage of sessions to record

- {formData.replay_sampling_rate}% -
- { - const i = (SAMPLING_RATE_OPTIONS as readonly number[]).indexOf(formData.replay_sampling_rate) - return i >= 0 ? i : SAMPLING_RATE_OPTIONS.length - 1 - })()} - onChange={(e) => { - const v = parseInt(e.target.value, 10) - const i = Math.max(0, Math.min(SAMPLING_RATE_OPTIONS.length - 1, v)) - setFormData({ - ...formData, - replay_sampling_rate: SAMPLING_RATE_OPTIONS[i], - }) - }} - className="w-full h-2 bg-neutral-200 dark:bg-neutral-700 rounded-lg appearance-none cursor-pointer accent-brand-orange" - /> - - {SAMPLING_RATE_OPTIONS.map((_, i) => ( - -
- {SAMPLING_RATE_OPTIONS.map((pct) => ( - - {pct}% - - ))} +