Skip to content

Commit f3f1f8a

Browse files
committed
OCPBUGS-54157: Sample segment sessions
1 parent bd6ef9a commit f3f1f8a

File tree

1 file changed

+2
-1
lines changed
  • frontend/packages/console-telemetry-plugin/src/listeners

1 file changed

+2
-1
lines changed

frontend/packages/console-telemetry-plugin/src/listeners/segment.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ const initSegment = () => {
9797
analytics.load(apiKey, options);
9898
};
9999

100-
if (!TELEMETRY_DISABLED && apiKey) {
100+
// Sample 20% of sessions
101+
if (!TELEMETRY_DISABLED && apiKey && Math.random() < 0.2) {
101102
initSegment();
102103
}
103104

0 commit comments

Comments
 (0)