Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't log downsample warning when unnecessary (#4291)

* fix log

use process.env

ensure the log happens regardless of `isDownsampledSession`

fix log

* oops, revert test

authored by

Hailey and committed by
GitHub
8e2c21a8 d6275e98

+10 -7
+10 -7
src/lib/statsig/statsig.tsx
··· 102 102 rawMetadata: LogEvents[E] & FlatJSONRecord, 103 103 ) { 104 104 try { 105 + if ( 106 + process.env.NODE_ENV === 'development' && 107 + eventName.endsWith(':sampled') && 108 + !DOWNSAMPLED_EVENTS.has(eventName) 109 + ) { 110 + logger.error( 111 + 'Did you forget to add ' + eventName + ' to DOWNSAMPLED_EVENTS?', 112 + ) 113 + } 114 + 105 115 if (isDownsampledSession && DOWNSAMPLED_EVENTS.has(eventName)) { 106 116 return 107 - } 108 - if (process.env.NODE_ENV === 'development') { 109 - if (eventName.endsWith(':sampled')) { 110 - logger.error( 111 - 'Did you forget to add ' + eventName + ' to DOWNSAMPLED_EVENTS?', 112 - ) 113 - } 114 117 } 115 118 const fullMetadata = { 116 119 ...rawMetadata,