Skip to content

Commit 8819193

Browse files
authored
fix(android): Use correct imports for InstrumentationFeature (#5645)
1 parent 8362439 commit 8819193

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

src/platforms/android/common/gradle.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The `io.sentry.android.gradle` >= `3.0.0` requires [Android Gradle Plugin >= 7.0
4848
We expose the following configuration values directly in your `app/build.gradle`:
4949

5050
```groovy
51-
import io.sentry.android.gradle.InstrumentationFeature
51+
import io.sentry.android.gradle.extensions.InstrumentationFeature
5252
5353
sentry {
5454
// Disables or enables the handling of Proguard mapping for Sentry.
@@ -91,16 +91,16 @@ sentry {
9191
// Defaults to all available values of InstrumentationFeature enum class.
9292
features = [InstrumentationFeature.DATABASE, InstrumentationFeature.FILE_IO, InstrumentationFeature.OKHTTP]
9393
}
94-
94+
9595
// Enable auto-installation of Sentry components (sentry-android SDK and okhttp, timber and fragment integrations).
9696
// Default is enabled.
9797
// Only available v3.1.0 and above.
9898
autoInstallation {
9999
enabled = true
100-
100+
101101
// Specifies a version of the sentry-android SDK and fragment, timber and okhttp integrations.
102-
//
103-
// This is also useful, when you have the sentry-android SDK already included into a transitive dependency/module and want to
102+
//
103+
// This is also useful, when you have the sentry-android SDK already included into a transitive dependency/module and want to
104104
// align integration versions with it (if it's a direct dependency, the version will be inferred).
105105
//
106106
// NOTE: if you have a higher version of the sentry-android SDK or integrations on the classpath, this setting will have no effect
@@ -113,7 +113,7 @@ sentry {
113113
```
114114

115115
```kotlin
116-
import io.sentry.android.gradle.InstrumentationFeature
116+
import io.sentry.android.gradle.extensions.InstrumentationFeature
117117

118118
sentry {
119119
// Disables or enables the handling of Proguard mapping for Sentry.
@@ -156,16 +156,16 @@ sentry {
156156
// Defaults to all available values of InstrumentationFeature enum class.
157157
features.set(setOf(InstrumentationFeature.DATABASE, InstrumentationFeature.FILE_IO, InstrumentationFeature.OKHTTP))
158158
}
159-
159+
160160
// Enable auto-installation of Sentry components (sentry-android SDK and okhttp, timber and fragment integrations).
161161
// Default is enabled.
162162
// Only available v3.1.0 and above.
163163
autoInstallation {
164164
enabled.set(true)
165-
165+
166166
// Specifies a version of the sentry-android SDK and fragment, timber and okhttp integrations.
167-
//
168-
// This is also useful, when you have the sentry-android SDK already included into a transitive dependency/module and want to
167+
//
168+
// This is also useful, when you have the sentry-android SDK already included into a transitive dependency/module and want to
169169
// align integration versions with it (if it's a direct dependency, the version will be inferred).
170170
//
171171
// NOTE: if you have a higher version of the sentry-android SDK or integrations on the classpath, this setting will have no effect
@@ -282,7 +282,7 @@ enum class InstrumentationFeature {
282282
* Requires sentry-android SDK version 5.5.0 and above
283283
*/
284284
FILE_IO,
285-
285+
286286
/**
287287
* When enabled the SDK will create spans for outgoing network requests and attach
288288
* sentry-trace-header for distributed tracing.

src/platforms/android/configuration/integrations/file-io.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Make sure, that [performance monitoring](/platforms/android/performance/#configu
6666
In general, no further configuration is required as the auto-instrumentation is enabled by default. If you would like to disable the file I/O instrumentation feature, we expose a configuration option for that:
6767

6868
```groovy
69-
import io.sentry.android.gradle.InstrumentationFeature
69+
import io.sentry.android.gradle.extensions.InstrumentationFeature
7070
7171
sentry {
7272
tracingInstrumentation {
@@ -78,7 +78,7 @@ sentry {
7878

7979
```kotlin
8080
import java.util.EnumSet
81-
import io.sentry.android.gradle.InstrumentationFeature
81+
import io.sentry.android.gradle.extensions.InstrumentationFeature
8282

8383
sentry {
8484
tracingInstrumentation {

src/platforms/android/configuration/integrations/okhttp.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Then, initialize the [Android SDK](/platforms/android/#configure).
5959
If you would like to disable the OkHttp instrumentation feature, we expose a configuration option for that:
6060

6161
```groovy
62-
import io.sentry.android.gradle.InstrumentationFeature
62+
import io.sentry.android.gradle.extensions.InstrumentationFeature
6363
6464
sentry {
6565
tracingInstrumentation {
@@ -71,7 +71,7 @@ sentry {
7171

7272
```kotlin
7373
import java.util.EnumSet
74-
import io.sentry.android.gradle.InstrumentationFeature
74+
import io.sentry.android.gradle.extensions.InstrumentationFeature
7575

7676
sentry {
7777
tracingInstrumentation {

src/platforms/android/configuration/integrations/room-and-sqlite.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Make sure, that [performance monitoring](/platforms/android/performance/#configu
6666
In general, no further configuration is required as the auto-instrumentation is enabled by default. If you would like to disable the database instrumentation feature, we expose a configuration option for that:
6767

6868
```groovy
69-
import io.sentry.android.gradle.InstrumentationFeature
69+
import io.sentry.android.gradle.extensions.InstrumentationFeature
7070
7171
sentry {
7272
tracingInstrumentation {
@@ -78,7 +78,7 @@ sentry {
7878

7979
```kotlin
8080
import java.util.EnumSet
81-
import io.sentry.android.gradle.InstrumentationFeature
81+
import io.sentry.android.gradle.extensions.InstrumentationFeature
8282

8383
sentry {
8484
tracingInstrumentation {
@@ -157,7 +157,7 @@ At the moment, we only support standard `androidx.room` usage. That is, the SDK
157157

158158
<Note>
159159

160-
If you are directly using [SupportSQLiteDatabase#query](https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteDatabase#query(java.lang.String)) or [SupportSQLiteDatabase#execSQL](https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteDatabase#execSQL(java.lang.String)) methods through the Room's SQLiteOpenHelper, consider switching to their alternatives that accept `bindArgs` as a second parameter.
160+
If you are directly using [SupportSQLiteDatabase#query](https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteDatabase#query(java.lang.String)) or [SupportSQLiteDatabase#execSQL](https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteDatabase#execSQL(java.lang.String)) methods through the Room's SQLiteOpenHelper, consider switching to their alternatives that accept `bindArgs` as a second parameter.
161161

162162
Because Sentry captures SQL queries as Span description, there is a risk of leaking sensitive data when not using an SQL string with placeholders.
163163

src/platforms/android/troubleshooting.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ You can set the debug log flag as an environment variable, which is picked up by
115115
In addition, set the `--stacktrace` flag:
116116

117117
```
118-
export SENTRY_LOG_LEVEL=debug && ./gradlew app:uploadSentryProguardMappingsRelease --stacktrace
118+
export SENTRY_LOG_LEVEL=debug && ./gradlew app:uploadSentryProguardMappingsRelease --stacktrace
119119
```
120120

121121
With this information, it might be more clear what's happening. If not, please consider reporting these issues on [GitHub](https://github.com/getsentry/sentry-android-gradle-plugin/issues), so we can keep track of them.
@@ -127,7 +127,7 @@ The [Sentry Android Gradle plugin](/platforms/android/gradle/) uses bytecode man
127127
The culprit is usually our [File I/O instrumentation](/platforms/android/configuration/integrations/file-io/), which can be disabled as follows:
128128

129129
```groovy
130-
import io.sentry.android.gradle.InstrumentationFeature
130+
import io.sentry.android.gradle.extensions.InstrumentationFeature
131131
132132
sentry {
133133
tracingInstrumentation {
@@ -139,7 +139,7 @@ sentry {
139139

140140
```kotlin
141141
import java.util.EnumSet
142-
import io.sentry.android.gradle.InstrumentationFeature
142+
import io.sentry.android.gradle.extensions.InstrumentationFeature
143143

144144
sentry {
145145
tracingInstrumentation {
@@ -189,7 +189,7 @@ Or update the Android Gradle Plugin to version `7.2.1`:
189189

190190
```groovy
191191
plugins {
192-
id 'com.android.application' version '7.2.1'
192+
id 'com.android.application' version '7.2.1'
193193
}
194194
```
195195

0 commit comments

Comments
 (0)