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/flutter/integrations/app-start-instrumentation.mdx
+22-39Lines changed: 22 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,27 @@ categories:
10
10
11
11
Sentry's app start instrumentation provides insight into how long your application takes to launch.
12
12
13
+
<Note>
14
+
15
+
App start instrumentation is available on **iOS** and **Android**.
16
+
17
+
</Note>
18
+
13
19
## Instrumentation Behaviour
14
20
15
21
Before diving into the configuration, it's important to understand how app start instrumentation behaves:
16
22
17
-
- The SDK attaches the app start metrics to the **first run transaction**.
18
-
- It tracks the length of time from the **earliest native process initialization** until the very first [PostFrameCallback](https://api.flutter.dev/flutter/scheduler/SchedulerBinding/addPostFrameCallback.html) is triggered.
19
-
- The SDK differentiates between a cold and a warm start, but doesn't track hot starts/resumes.
23
+
- It tracks the length of time from the **earliest native process initialization** until the very first frame rendered that is reported by [addTimingsCallback](https://api.flutter.dev/flutter/scheduler/SchedulerBinding/addTimingsCallback.html). Once the app start is processed, the SDK removes the callback in order to avoid additional overhead.
24
+
- After receiving information about the start and end times of the app launch, the SDK does the following:
25
+
- creates a transaction with the name `ui.load`
26
+
- in the transaction attaches a span with the operation `app.start.cold` or `app.start.warm`
27
+
- attaches the app start metrics to the transaction
28
+
29
+
<Note>
30
+
31
+
The SDK differentiates between a cold and a warm start, but doesn't track hot starts/resumes.
32
+
33
+
</Note>
20
34
21
35
## Prerequisites
22
36
@@ -27,49 +41,18 @@ Before starting, ensure:
27
41
28
42
## Configure
29
43
30
-
This type of instrumentation is automatically enabled. There is no need for further configuration.
44
+
This instrumentation is automatically enabled. There is no need for further configuration.
31
45
32
46
## Verify
33
47
34
-
### 1. Execute the Transaction:
35
-
36
-
Initiate a transaction immediately after the app launches.
37
-
38
-
```dart
39
-
import 'package:sentry/sentry.dart';
48
+
### 1. Launch your app:
40
49
41
-
final transaction = Sentry.startTransaction("test test", "my operation");
0 commit comments