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
Copy file name to clipboardExpand all lines: docs/platforms/android/configuration/options.mdx
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -305,7 +305,7 @@ Set this boolean to `false` to disable tracing for `OPTIONS` requests. This opti
305
305
306
306
<Alerttitle="Note">
307
307
308
-
Profiling requires SDK versions 8.7.0 or higher. Lower versions can use the legacy profiling.
308
+
Profiling requires SDK versions 8.7.0 or higher. Lower versions can use the <PlatformLinkto="/configuration/options/#legacy-profiling-options">legacy profiling</PlatformLink>.
309
309
310
310
</Alert>
311
311
@@ -335,11 +335,7 @@ A boolean value that determines whether the app start process will be profiled.
335
335
336
336
## Legacy Profiling Options
337
337
338
-
<Alerttitle="Note">
339
-
340
-
SDK versions lower than 8.6.0 may use the legacy profiling using the following options.
341
-
342
-
</Alert>
338
+
SDK versions lower than 8.7.0 may use the legacy profiling through the following options.
// Add data like request headers, user ip address and device name, see https://docs.sentry.io/platforms/android/data-management/data-collected/ for more info
111
+
options.setSendDefaultPii(true);
112
+
// Enable the performance API by setting a sample-rate, adjust in production env
113
+
options.setTracesSampleRate(1.0);
114
+
// Enable profiling, adjust in production env. This is evaluated only once per session
115
+
options.setProfileSessionSampleRate(1.0);
116
+
// Set profiling lifecycle, can be `manual` (controlled through `Sentry.startProfiler()` and `Sentry.stopProfiler()`) or `trace` (automatically starts and stop a profile whenever a sampled trace starts and finishes)
// Add data like request headers, user ip address and device name, see https://docs.sentry.io/platforms/android/data-management/data-collected/ for more info
148
+
options.isSendDefaultPii =true
149
+
// Enable the performance API by setting a sample-rate, adjust in production env
150
+
options.tracesSampleRate =1.0
151
+
// Enable profiling, adjust in production env. This is evaluated only once per session
152
+
options.profileSessionSampleRate =1.0
153
+
// Set profiling lifecycle, can be `manual` (controlled through `Sentry.startProfiler()` and `Sentry.stopProfiler()`) or `trace` (automatically starts and stop a profile whenever a sampled trace starts and finishes)
154
+
options.profileLifecycle =ProfileLifecycle.TRACE
155
+
// Enable profiling on app start. The app start profile has to be stopped through Sentry.stopProfiler() if lifecycle is set to `manual`
156
+
options.isStartProfilerOnAppStart =true
157
+
// Record session replays for 100% of errors and 10% of sessions
158
+
options.sessionReplay.onErrorSampleRate =1.0
159
+
options.sessionReplay.sessionSampleRate =0.1
160
+
})
161
+
// Start profiling, if lifecycle is set to `manual` and startProfilerOnAppStart is set to `true`
162
+
Sentry.startProfiler()
163
+
// Stop profiling, if lifecycle is set to `manual` and startProfilerOnAppStart is set to `true`.
164
+
// This call is optional. If you don't stop the profiler, it will keep profiling your application until the process exits.
165
+
Sentry.stopProfiler()
166
+
}
167
+
}
168
+
```
169
+
95
170
## Verify
96
171
97
172
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.
Copy file name to clipboardExpand all lines: docs/platforms/android/profiling/index.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ sidebar_order: 5000
14
14
## Installation
15
15
16
16
Android profiling is available starting in SDK version `8.7.0`.
17
-
The legacy profiler is available on SDK versions '6.16.0' and higher through <PlatformLinkto="/configuration/options/#legacy-profiling-options">its options</PlatformLink>.
17
+
The legacy profiler is available on SDK versions `6.16.0` and higher through <PlatformLinkto="/configuration/options/#legacy-profiling-options">its options</PlatformLink>.
0 commit comments