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
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -303,52 +303,52 @@ Set this boolean to `false` to disable tracing for `OPTIONS` requests. This opti
303
303
304
304
## Profiling Options
305
305
306
-
<ConfigKeyname="profiles-sample-rate">
306
+
<ConfigKeyname="profile-session-sample-rate">
307
307
308
-
A number between `0` and `1`, controlling the percentage chance a given profile will be sent to Sentry. (`0` represents 0% while `1` represents 100%.) Applies only to sampled transactions created in the app. Either this or <PlatformIdentifiername="profiles-sampler" /> must be defined to enable transaction profiling. Don't set it if you want to use <PlatformLinkto="/profiling/#continuous-profiling">Continuous Profiling</PlatformLink>.
308
+
A number between `0` and `1`, controlling the percentage chance the session will be profiled. `0` represents 0% while `1` represents 100%. The default is null (disabled).
309
309
310
310
</ConfigKey>
311
311
312
-
<ConfigKeyname="profiles-sampler">
312
+
<ConfigKeyname="profile-lifecycle">
313
313
314
-
A function responsible for determining the percentage chance a given profile will be sent to Sentry. It will automatically be passed information about the transaction and the context in which it's being created, and must return a number between `0` (0% chance of being sent) and `1` (100% chance of being sent). Can also be used for filtering profiles, by returning 0 for those that are unwanted. Either this or <PlatformIdentifiername="profiles-sample-rate" /> must be defined to enable transaction profiling. Don't set it if you want to use <PlatformLinkto="/profiling/#continuous-profiling">Continuous Profiling</PlatformLink>.
314
+
Whether the profiling lifecycle is controlled manually or based on the trace lifecycle. Possible values are:
315
+
316
+
-`manual`: **default** Profiler must be started and stopped through `Sentry.startProfiler()` and `Sentry.stopProfiler()` APIs
317
+
-`trace`: Profiler is started and stopped automatically whenever a sampled trace starts and finishes
315
318
316
319
</ConfigKey>
317
320
318
-
<ConfigKeyname="enable-app-start-profiling">
321
+
<ConfigKeyname="start-profiler-on-app-start">
319
322
320
-
A boolean value that determines whether the app start process will be profiled. When true, the startup process, including ContentProviders, Application and first Activity creation, will be profiled. Note that <PlatformIdentifiername="profiles-sample-rate" /> or <PlatformIdentifiername="profiles-sampler" /> must be defined.
323
+
A boolean value that determines whether the app start process will be profiled. When true, the startup process, including ContentProviders, Application and first Activity creation, will be profiled. Note that <PlatformIdentifiername="profile-session-sample-rate" /> must be defined.
324
+
325
+
- If profileLifecycle is set to `manual`: profiling is started automatically on startup and stopProfiler must be called manually whenever the app startup is deemed to be completed
326
+
- If profileLifecycle is set to `trace`: profiling is started automatically on startup, and will automatically be stopped when the root span that is associated with app startup ends
321
327
322
328
</ConfigKey>
323
329
324
-
## Continuous Profiling Options
330
+
## Legacy Profiling Options
325
331
326
-
<Alert>
332
+
<Alerttitle="✨ Note">
327
333
328
-
This feature is experimental and may have bugs.
334
+
SDK versions lower than 8.6.0 may use the legacy profiling using the following options.
329
335
330
336
</Alert>
331
337
332
-
<ConfigKeyname="profile-session-sample-rate">
338
+
<ConfigKeyname="profiles-sample-rate">
333
339
334
-
A number between `0` and `1`, controlling the percentage chance the session will be profiled. `0` represents 0% while `1` represents 100%. The default is null (disabled). <PlatformIdentifiername="profiles-sampler" /> and <PlatformIdentifiername="profiles-sample-rate" /> must not be set to enable <PlatformLinkto="/profiling/#continuous-profiling">Continuous Profiling</PlatformLink>.
340
+
A number between `0` and `1`, controlling the percentage chance a given profile will be sent to Sentry. (`0` represents 0% while `1` represents 100%.) Applies only to sampled transactions created in the app. Setting this option will enable the legacy profiler.
335
341
336
342
</ConfigKey>
337
343
338
-
<ConfigKeyname="profile-lifecycle">
339
-
340
-
Whether the profiling lifecycle is controlled manually or based on the trace lifecycle. Possible values are:
344
+
<ConfigKeyname="profiles-sampler">
341
345
342
-
-`manual`: **default** Profiler must be started and stopped through `Sentry.startProfiler()` and `Sentry.stopProfiler()` APIs
343
-
-`trace`: Profiler is started and stopped automatically whenever a sampled trace starts and finishes
346
+
A function responsible for determining the percentage chance a given profile will be sent to Sentry. It will automatically be passed information about the transaction and the context in which it's being created, and must return a number between `0` (0% chance of being sent) and `1` (100% chance of being sent). Can also be used for filtering profiles, by returning 0 for those that are unwanted. Either this or <PlatformIdentifiername="profiles-sample-rate" /> must be defined to enable transaction profiling. Setting this option will enable the legacy profiler.
344
347
345
348
</ConfigKey>
346
349
347
-
<ConfigKeyname="start-profiler-on-app-start">
348
-
349
-
A boolean value that determines whether the app start process will be profiled. When true, the startup process, including ContentProviders, Application and first Activity creation, will be profiled. Note that <PlatformIdentifiername="profile-session-sample-rate" /> must be defined.
350
+
<ConfigKeyname="enable-app-start-profiling">
350
351
351
-
- If profileLifecycle is set to `manual`: profiling is started automatically on startup and stopProfiler must be called manually whenever the app startup is deemed to be completed
352
-
- If profileLifecycle is set to `trace`: profiling is started automatically on startup, and will automatically be stopped when the root span that is associated with app startup ends
352
+
A boolean value that determines whether the app start process will be profiled. When true, the startup process, including ContentProviders, Application and first Activity creation, will be profiled.
<!-- 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)-->
<!-- record session replays for 100% of errors and 10% of sessions -->
@@ -99,7 +96,7 @@ Configuration is done via the application `AndroidManifest.xml`. Here's an examp
99
96
100
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.
// Any code running after this line will be profiled, if lifecycle is set to `manual`.
113
109
Sentry.startProfiler();
114
110
try {
115
111
thrownewException("This is a test.");
116
112
} catch (Exception e) {
117
113
Sentry.captureException(e);
118
114
}
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.
// Any code running after this line will be profiled, if lifecycle is set to `manual`.
134
130
Sentry.startProfiler()
135
131
try {
136
132
throwException("This is a test.")
137
133
} catch (e:Exception) {
138
134
Sentry.captureException(e)
139
135
}
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.
0 commit comments