···87878888If you change `SENTRY_AUTH_TOKEN`, you need to do `yarn prebuild` before running `yarn ios` or `yarn android` again.
89899090-### Adding bitdrift
9191-9292-Adding bitdrift is NOT required. You can keep `EXPO_PUBLIC_BITDRIFT_API_KEY=` in `.env` which will avoid initializing bitdrift during startup.
9393-9494-However, if you're a part of the Bluesky team and want to enable bitdrift, fill in `EXPO_PUBLIC_BITDRIFT_API_KEY` in your `.env` to enable bitdrift.
9595-9690### Adding and Updating Locales
97919892- `yarn intl:build` -> you will also need to run this anytime `./src/locale/{locale}/messages.po` change
···8080export const SENTRY_DSN: string | undefined = process.env.EXPO_PUBLIC_SENTRY_DSN
81818282/**
8383- * Bitdrift API key. If undefined, Bitdrift should be disabled.
8484- */
8585-export const BITDRIFT_API_KEY: string | undefined =
8686- process.env.EXPO_PUBLIC_BITDRIFT_API_KEY
8787-8888-/**
8983 * GCP project ID which is required for native device attestation. On web, this
9084 * should be unset and evaluate to 0.
9185 */
-1
src/logger/bitdrift/lib/index.ts
···11-export {debug, error, info, warn} from '@bitdrift/react-native'
-4
src/logger/bitdrift/lib/index.web.ts
···11-export function debug() {}
22-export function error() {}
33-export function info() {}
44-export function warn() {}
-27
src/logger/bitdrift/setup/index.ts
···11-import {init, SessionStrategy} from '@bitdrift/react-native'
22-import {Statsig} from 'statsig-react-native-expo'
33-44-import {initPromise} from '#/lib/statsig/statsig'
55-import {BITDRIFT_API_KEY} from '#/env'
66-77-initPromise.then(() => {
88- let isEnabled = false
99- let isNetworkEnabled = false
1010- try {
1111- if (Statsig.checkGate('enable_bitdrift_v2')) {
1212- isEnabled = true
1313- }
1414- if (Statsig.checkGate('enable_bitdrift_v2_networking')) {
1515- isNetworkEnabled = true
1616- }
1717- } catch (e) {
1818- // Statsig may complain about it being called too early.
1919- }
2020- if (isEnabled && BITDRIFT_API_KEY) {
2121- init(BITDRIFT_API_KEY, SessionStrategy.Activity, {
2222- url: 'https://api-bsky.bitdrift.io',
2323- // Only effects iOS, Android instrumentation is set via Gradle Plugin
2424- enableNetworkInstrumentation: isNetworkEnabled,
2525- })
2626- }
2727-})
src/logger/bitdrift/setup/index.web.ts
This is a binary file and will not be displayed.
+1-5
src/logger/index.ts
···1111 type Transport,
1212} from '#/logger/types'
1313import {enabledLogLevels} from '#/logger/util'
1414-import {isNative} from '#/platform/detection'
1514import {ENV} from '#/env'
1616-import {bitdriftTransport} from './transports/bitdrift'
1715import {sentryTransport} from './transports/sentry'
18161917const TRANSPORTS: Transport[] = (function configureTransports() {
2018 switch (ENV) {
2119 case 'production': {
2222- return [sentryTransport, isNative && bitdriftTransport].filter(
2323- Boolean,
2424- ) as Transport[]
2020+ return [sentryTransport].filter(Boolean) as Transport[]
2521 }
2622 case 'test': {
2723 return []