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
@@ -245,7 +281,18 @@ enum class InstrumentationFeature {
245
281
*
246
282
* Requires sentry-android SDK version 5.5.0 and above
247
283
*/
248
-
FILE_IO
284
+
FILE_IO,
285
+
286
+
/**
287
+
* When enabled the SDK will create spans for outgoing network requests and attach
288
+
* sentry-trace-header for distributed tracing.
289
+
* This feature uses bytecode manipulation and attaches SentryOkHttpInterceptor to all OkHttp
290
+
* clients in the project.
291
+
*
292
+
* Requires sentry-android SDK version 5.0.0 and above.
293
+
* Only available v3.1.0 and above of the Sentry Android Gradle plugin.
294
+
*/
295
+
OKHTTP
249
296
}
250
297
```
251
298
@@ -256,3 +303,23 @@ Check [Integrations](/platforms/android/configuration/integrations/) page for mo
256
303
To learn more about the internals of auto-instrumentation, check out this [blog post](https://blog.sentry.io/2021/12/14/bytecode-transformations-the-android-gradle-plugin).
257
304
258
305
</Note>
306
+
307
+
## Auto-Installation
308
+
309
+
The plugin offers the automated installation feature of the Sentry Android SDK and the [Fragment](/platforms/android/configuration/integrations/fragment/), [Timber](/platforms/android/configuration/integrations/timber/), and [OkHttp](/platforms/android/configuration/integrations/okhttp/) integrations. Starting with version 3.1.0, the feature is enabled by default, so you don't need to add any dependencies — you just use the Sentry Gradle plugin.
310
+
311
+
The plugin algorithm does the following when defining dependency versions:
312
+
313
+
1. Check if the module/app has a direct dependency on the Sentry Android SDK:
314
+
315
+
- If yes, then use the version of the direct dependency.
316
+
317
+
- If no, then automatically add the sentry-android dependency with the specified `sentryVersion` from the plugin configuration (defaults to the latest published SDK version).
318
+
319
+
2. Check if the module/app has a direct dependency on any of the integrations (Fragment, Timber, or OkHttp):
320
+
321
+
- If yes, then keep the current version of the direct dependency.
322
+
323
+
- If no, then automatically add the integration dependency with the version of the Sentry Android SDK inferred from above.
324
+
325
+
3. If there are transitive dependencies on any of the integrations or the Sentry Android SDK, then their versions are not considered. However, if the versions are higher than those bundled with the Sentry Gradle plugin, Gradle will choose them instead.
0 commit comments