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
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -301,11 +301,11 @@ Set this boolean to `false` to disable tracing for `OPTIONS` requests. This opti
301
301
302
302
</ConfigKey>
303
303
304
-
## Profiling Options
304
+
## UI Profiling Options
305
305
306
306
<Alerttitle="Note">
307
307
308
-
Profiling requires SDK versions 8.7.0 or higher. Lower versions can use the <PlatformLinkto="/configuration/options/#legacy-profiling-options">legacy profiling</PlatformLink>.
308
+
UI Profiling requires SDK versions `8.7.0` or higher. Lower versions can use the <PlatformLinkto="/configuration/options/#transaction-based-profiling-options">transaction-based profiling</PlatformLink>.
309
309
310
310
</Alert>
311
311
@@ -317,7 +317,7 @@ A number between `0` and `1`, controlling the percentage chance the session will
317
317
318
318
<ConfigKeyname="profile-lifecycle">
319
319
320
-
Whether the profiling lifecycle is controlled manually or based on the trace lifecycle. Possible values are:
320
+
Whether the UI profiling lifecycle is controlled manually or based on the trace lifecycle. Possible values are:
321
321
322
322
-`manual`: **default** Profiler must be started and stopped through `Sentry.startProfiler()` and `Sentry.stopProfiler()` APIs
323
323
-`trace`: Profiler is started and stopped automatically whenever a sampled trace starts and finishes
@@ -333,9 +333,7 @@ A boolean value that determines whether the app start process will be profiled.
333
333
334
334
</ConfigKey>
335
335
336
-
## Legacy Profiling Options
337
-
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
-
170
95
## Verify
171
96
172
97
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
+18-25Lines changed: 18 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,27 +13,20 @@ sidebar_order: 5000
13
13
14
14
## Installation
15
15
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>.
16
+
Android UI Profiling is available starting in SDK version `8.7.0`.
17
+
The transaction-based profiler is available on SDK versions `6.16.0` and higher through <PlatformLinkto="/configuration/options/#transaction-based-profiling-options">its options</PlatformLink>.
18
18
19
-
## Enabling Profiling
19
+
## Enabling UI Profiling
20
20
21
-
Profiling supports two modes - `manual` and `trace`. The two modes are mutually exclusive, and cannot be used at the same time.
21
+
UI Profiling supports two modes - `manual` and `trace`. The two modes are mutually exclusive, and cannot be used at the same time.
22
22
23
23
In `manual` mode, the profiling data collection can be managed via calls to `Sentry.profiler.startProfiler` and `Sentry.profiler.stopProfiler`. You are entirely in the in control of when the profiler runs.
24
24
25
25
In `trace` mode, the profiler manages its own start and stop calls, which are based on spans: the profiler continues to run while there is at least one active sampled span, and stops when there are no active sampled spans.
26
26
27
27
Sentry SDK supports an additional `profileSessionSampleRate` that will enable or disable profiling for the entire <PlatformLinkto="/configuration/releases/#sessions">session</PlatformLink>. This sampling decision is evaluated only once per session.
28
28
29
-
<Alerttitle="Note">
30
-
31
-
Continuous profiling has implications for your org's billing structure. This feature is only available for subscription plans that enrolled after June 5, 2024.
32
-
You can still use the legacy profiling for older plans.
33
-
34
-
</Alert>
35
-
36
-
### Enabling Trace Lifecycle Profiling
29
+
### Enabling Trace Lifecycle UI Profiling
37
30
38
31
To enable trace profiling, set the lifecycle to `trace`. Trace profiling requires tracing to be enabled.
39
32
@@ -46,7 +39,7 @@ By default, some transactions will be created automatically for common operation
// Enable profiling on app start. The app start profile has to be stopped through Sentry.stopProfiler()
@@ -164,7 +157,7 @@ class MyApplication : Application() {
164
157
this,
165
158
{ options ->
166
159
options.dsn ="___PUBLIC_DSN___"
167
-
// Enable profiling, adjust in production env. This is evaluated only once per session
160
+
// Enable UI profiling, adjust in production env. This is evaluated only once per session
168
161
options.profileSessionSampleRate =1.0
169
162
options.profileLifecycle =ProfileLifecycle.MANUAL
170
163
// Enable profiling on app start. The app start profile has to be stopped through Sentry.stopProfiler()
@@ -179,23 +172,23 @@ class MyApplication : Application() {
179
172
}
180
173
```
181
174
182
-
### Enabling Legacy Profiling
175
+
### Enabling Transaction based Profiling
183
176
184
177
<Alert>
185
178
186
-
Android legacy profiling is available starting in SDK version `6.16.0` and is supported on API level 22 and up.
179
+
Android transaction-based profiling is available starting in SDK version `6.16.0` and is supported on API level 22 and up.
187
180
App start profiling is available starting in SDK version `7.3.0`.
188
181
189
182
</Alert>
190
183
191
-
The legacy profiling only runs in tandem with performance transactions that were started either automatically or manually with `Sentry.startTransaction`, and stops automatically after 30 seconds (unless you manually stop it earlier). Naturally, this limitation makes it difficult to get full coverage of your app's execution.
184
+
The transaction-based profiling only runs in tandem with performance transactions that were started either automatically or manually with `Sentry.startTransaction`, and stops automatically after 30 seconds (unless you manually stop it earlier). Naturally, this limitation makes it difficult to get full coverage of your app's execution.
0 commit comments