Skip to content

Commit 7b00e75

Browse files
committed
removed start/stop profiler code snippet in verify section of the Android getting started page
1 parent f2876d3 commit 7b00e75

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

docs/platforms/android/index.mdx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Configuration is done via the application `AndroidManifest.xml`. Here's an examp
9696

9797
Verify that your app is sending events to Sentry by adding the following snippet, which includes an intentional error. You should see the error reported in Sentry within a few minutes.
9898

99-
```java {"onboardingOptions": {"profiling": "9-10, 16-17"}}
99+
```java
100100
import androidx.appcompat.app.AppCompatActivity;
101101
import android.os.Bundle;
102102
import java.lang.Exception;
@@ -105,36 +105,28 @@ import io.sentry.Sentry;
105105
public class MyActivity extends AppCompatActivity {
106106
protected void onCreate(Bundle savedInstanceState) {
107107
super.onCreate(savedInstanceState);
108-
// Any code running after this line will be profiled, if lifecycle is set to `manual`.
109-
Sentry.startProfiler();
110108
try {
111109
throw new Exception("This is a test.");
112110
} catch (Exception e) {
113111
Sentry.captureException(e);
114112
}
115-
// Stop profiling, if lifecycle is set to `manual`. This call is optional. If you don't stop the profiler, it will keep profiling your application until the process exits or `Sentry.stopProfiler()` is called.
116-
Sentry.stopProfiler();
117113
}
118114
}
119115
```
120116

121-
```kotlin {"onboardingOptions": {"profiling": "8-9, 15-16"}}
117+
```kotlin
122118
import androidx.appcompat.app.AppCompatActivity
123119
import android.os.Bundle
124120
import io.sentry.Sentry
125121

126122
class MyActivity : AppCompatActivity() {
127123
override fun onCreate(savedInstanceState: Bundle?) {
128124
super.onCreate(savedInstanceState)
129-
// Any code running after this line will be profiled, if lifecycle is set to `manual`.
130-
Sentry.startProfiler()
131125
try {
132126
throw Exception("This is a test.")
133127
} catch (e: Exception) {
134128
Sentry.captureException(e)
135129
}
136-
// Stop profiling, if lifecycle is set to `manual`. This call is optional. If you don't stop the profiler, it will keep profiling your application until the process exits or `Sentry.stopProfiler()` is called.
137-
Sentry.stopProfiler()
138130
}
139131
}
140132
```

0 commit comments

Comments
 (0)