You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The automatic capture of network requests can be achieved in a few different ways depending on the platform and the networking library being used.
151
151
152
-
When initialization is done in JavaScript, always pass `enableNetworkInstrumentation: true` to `init(...)`. This is required on both iOS and Android.
152
+
When initialization is done in JavaScript, pass `enableNetworkInstrumentation: true` to `init(...)` for iOS network instrumentation.
153
153
154
154
#### iOS
155
155
@@ -178,21 +178,18 @@ plugins {
178
178
179
179
To find the version to use, use the same version of the Capture SDK that is being used in the React Native project. Check the `build.gradle` file in the `node_modules/@bitdrift/react-native/android` directory for the version of the Capture SDK being used.
180
180
181
-
For Android, the plugin also needs instrumentation settings:
181
+
For Android, enable the plugin instrumentation block:
182
182
183
183
```gradle
184
184
bitdrift {
185
185
instrumentation {
186
186
automaticOkHttpInstrumentation = true
187
-
okHttpInstrumentationType = OVERWRITE
187
+
// Optional. Defaults to PROXY when omitted.
188
+
// okHttpInstrumentationType = OVERWRITE
188
189
}
189
190
}
190
191
```
191
192
192
-
`okHttpInstrumentationType` modes:
193
-
-`PROXY` (plugin default): preserves existing `EventListener.Factory` behavior in OkHttp clients.
194
-
-`OVERWRITE`: replaces the listener factory and can avoid duplicate network spans in some app setups.
195
-
196
193
In addition to this the plugin repository needs to be added to the `pluginManagement` block in the `settings.gradle` file:
0 commit comments