diff options
author | Eric Bailey <git@esb.lol> | 2025-02-13 15:59:30 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-13 15:59:30 -0600 |
commit | 22a902e0de1872f7d8ba8297c315b24461c8d9ed (patch) | |
tree | 61ed6b8cb7d9a5c927eb874ff0ce2065f8b15e67 /src/lib/bitdrift.ts | |
parent | 99051f0ab134715847abb16acd852f11216b93b9 (diff) | |
download | voidsky-22a902e0de1872f7d8ba8297c315b24461c8d9ed.tar.zst |
Bitdrift integration (#7728)
* update bitdrift to 0.6.7 and enable iOS network integration (#7575) * update bitdrift to 0.6.5 and enable iOS network integration * Update src/lib/bitdrift.ts Co-authored-by: Mark <40143016+Maker-Mark@users.noreply.github.com> * update to 0.6.7 --------- Co-authored-by: Mark <40143016+Maker-Mark@users.noreply.github.com> * deps: Bump bitdrift to 0.6.8, fixes iOS network instrumentation bug (#7725) Co-authored-by: Eric Bailey <git@esb.lol> * Add stable ID copy, add todo * Nits * Temp enable * Temp debug * Revert some debug * Revert unnecessary change * Use new gates * Add anon ID to version string --------- Co-authored-by: Snow Pettersen <snowp@lyft.com> Co-authored-by: Mark <40143016+Maker-Mark@users.noreply.github.com>
Diffstat (limited to 'src/lib/bitdrift.ts')
-rw-r--r-- | src/lib/bitdrift.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/bitdrift.ts b/src/lib/bitdrift.ts index 71493d0bc..98f2dd11e 100644 --- a/src/lib/bitdrift.ts +++ b/src/lib/bitdrift.ts @@ -1,23 +1,30 @@ import {init, SessionStrategy} from '@bitdrift/react-native' import {Statsig} from 'statsig-react-native-expo' -export {debug, error, info, warn} from '@bitdrift/react-native' import {initPromise} from './statsig/statsig' +export {debug, error, info, warn} from '@bitdrift/react-native' + const BITDRIFT_API_KEY = process.env.BITDRIFT_API_KEY initPromise.then(() => { let isEnabled = false + let isNetworkEnabled = false try { - if (Statsig.checkGate('enable_bitdrift')) { + if (Statsig.checkGate('enable_bitdrift_v2')) { isEnabled = true } + if (Statsig.checkGate('enable_bitdrift_v2_networking')) { + isNetworkEnabled = true + } } catch (e) { // Statsig may complain about it being called too early. } if (isEnabled && BITDRIFT_API_KEY) { init(BITDRIFT_API_KEY, SessionStrategy.Activity, { url: 'https://api-bsky.bitdrift.io', + // Only effects iOS, Android instrumentation is set via Gradle Plugin + enableNetworkInstrumentation: isNetworkEnabled, }) } }) |