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: src/platforms/android/configuration/integrations/file-io.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Supported in Sentry Android Gradle Plugin version `3.0.0` and above.
17
17
18
18
The [Sentry Android Gradle Plugin](/platforms/android/gradle/) provides file I/O support through bytecode manipulation. The source can be found [on GitHub](https://github.com/getsentry/sentry-android-gradle-plugin/tree/main/plugin-build/src/main/kotlin/io/sentry/android/gradle/instrumentation).
19
19
20
-
On this page, we get you up and running with Sentry's file I/O integration, so that it will automatically start a span out of the active transaction, bound to the scope for each file input/output stream operation.
20
+
On this page, we get you up and running with Sentry's file I/O integration, so that it will automatically start a span from an active transaction that's bound to the scope of each file input/output stream operation.
Copy file name to clipboardExpand all lines: src/platforms/android/configuration/integrations/fragment.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ categories:
10
10
11
11
The `sentry-android-fragment` library provides [Fragment](https://developer.android.com/jetpack/androidx/releases/fragment) support for Sentry using the [FragmentLifecycleIntegration](https://github.com/getsentry/sentry-java/blob/a5f30b43b1dad2634ce020809f3b52e0d564a22a/sentry-android-fragment/src/main/java/io/sentry/android/fragment/FragmentLifecycleIntegration.kt). The source can be found [on GitHub](https://github.com/getsentry/sentry-java/tree/main/sentry-android-fragment/src/main/java/io/sentry/android/fragment).
12
12
13
-
On this page, we get you up and running with Sentry's Fragment Integration, so that it will automatically add a breadcrumb for each fragment's lifecycle and start a span out of the active transaction bound to the scope for each launch of a fragment.
13
+
On this page, we get you up and running with Sentry's Fragment Integration, so that it will automatically add a breadcrumb for each fragment's lifecycle and start a span from an active transaction that's bound to the scope of each launch of a fragment.
14
14
15
15
## Auto-Installation With the Sentry Android Gradle Plugin
16
16
@@ -46,7 +46,7 @@ plugins {
46
46
47
47
Then, initialize the [Android SDK](/platforms/android/#configure).
48
48
49
-
The Android SDK automatically adds the `FragmentLifecycleIntegration` if the `sentry-android-fragment` dependency was found on the classpath. The integration is added with both `enableFragmentLifecycleBreadcrumbs` and `enableAutoFragmentLifecycleTracing` enabled.
49
+
The Android SDK automatically adds the `FragmentLifecycleIntegration` if the `sentry-android-fragment` dependency was found on the classpath. The integration is added with both `enableFragmentLifecycleBreadcrumbs` and `enableAutoFragmentLifecycleTracing` enabled.
50
50
51
51
However, you can still override the default behaviour by adding your own instance of the `FragmentLifecycleIntegration`. For that, refer to the [manual installation](/platforms/android/configuration/integrations/fragment/#configure) section below.
Copy file name to clipboardExpand all lines: src/platforms/android/configuration/integrations/room-and-sqlite.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Supported in Sentry Android Gradle Plugin version `3.0.0` and above.
17
17
18
18
The [Sentry Android Gradle Plugin](/platforms/android/gradle/) provides Room and AndroidX SQLite support through bytecode manipulation. The source can be found [on GitHub](https://github.com/getsentry/sentry-android-gradle-plugin/tree/main/plugin-build/src/main/kotlin/io/sentry/android/gradle/instrumentation).
19
19
20
-
On this page, we get you up and running with Sentry's Room and SQLite Integration, so that it will automatically start a span out of the active transaction, bound to the scope for each sqlite/dao query.
20
+
On this page, we get you up and running with Sentry's Room and SQLite Integration, so that it will automatically start a span from an active transaction that's bound to the scope of each sqlite/dao query.
Copy file name to clipboardExpand all lines: src/platforms/dart/common/performance/instrumentation/automatic-instrumentation.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -38,8 +38,8 @@ The Sentry-specific file I/O implementation starts a span out of the active span
38
38
39
39
In addition, the span contains other useful information such as `file.size` (raw number of bytes), `file.path` (an absolute path to the file), and `file.async` (`true` if the called method returns a `Future`, or `false` if it's a `Sync` call) as part of the `data` payload.
40
40
41
-
The span finishes once the operation has been executed. The span `status` is set to `SpanStatus.ok` if successful or `SpanStatus.internalError` if there was any error.
41
+
The span finishes once the operation has been executed. The span `status` is then set to `SpanStatus.ok` if successful, or `SpanStatus.internalError` if there was an error.
42
42
43
-
When the operation throws an `Exception`, Sentry's SDK associates this exception to the running span. If you haven't set the SDK to swallow the exception and capture it, the span and `SentryEvent` will be linked when viewing it on the **Issue Details** page in [sentry.io](https://sentry.io).
43
+
When the operation throws an `Exception`, Sentry's SDK associates it with the running span. If you haven't set the SDK to swallow and capture the exception, the span and `SentryEvent` will be shown as linked on the **Issue Details** page in [sentry.io](https://sentry.io).
44
44
45
45
For more information see our [file I/O integration](/platforms/dart/configuration/integrations/file/).
Copy file name to clipboardExpand all lines: src/platforms/dart/configuration/integrations/file.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ The `sentry_file` library provides [File](https://api.dart.dev/stable/2.18.5/dar
8
8
9
9
The source can be found [on GitHub](https://github.com/getsentry/sentry-dart/tree/main/file/).
10
10
11
-
On this page, we get you up and running with Sentry's file I/O integration, so that it will automatically start a span out of the active transaction, bound to the scope for operations such as `copy`, `create`, `delete`, `open`, `rename`, `read`, and `write`.
11
+
On this page, we get you up and running with Sentry's file I/O integration, so that it will automatically start a span from an active transaction that's bound to the scope of each operation such as `copy`, `create`, `delete`, `open`, `rename`, `read`, and `write`.
description: "Learn more about the Sentry sqflite Database Instrumentation for the Flutter SDK."
7
+
categories:
8
+
- mobile
9
+
---
10
+
11
+
<Includename="beta-note.mdx" />
12
+
13
+
_(New in version 7.2.0)_
14
+
15
+
The [sentry_sqflite](https://pub.dev/packages/sentry_sqflite) package provides `sqflite` support for database instrumentation. The source can be found [on GitHub](https://github.com/getsentry/sentry-dart/tree/main/sqflite). Note, that to capture transactions, you have to first <PlatformLinkto="/performance/">set up performance monitoring</PlatformLink>.
16
+
17
+
## Install
18
+
19
+
Add the `sentry_sqflite` dependency to install the sqflite database instrumentation.
There are four ways to configure the sqflite database instrumentation:
31
+
32
+
By using the global `databaseFactory`, (which is used by the `openDatabase` method). With this approach, every call to `openDatabase` will be instrumented, including from other packages:
final database = await openDatabase('path/to/db');
69
+
final sentryDatabase = SentryDatabase(database);
70
+
```
71
+
72
+
After configuring via one of the above methods, every `CRUD` operation, including database transactions and batches, will be automatically instrumented and sent to Sentry.
73
+
74
+
The spans' `operation` are either `db`, `db.sql.execute`, `db.sql.query` or `db.sql.transaction`. Its `description` is the SQL statement using placeholders instead of its values due to the possibility of containing PII.
Copy file name to clipboardExpand all lines: src/platforms/flutter/common/performance/instrumentation/automatic-instrumentation.mdx
+17-7Lines changed: 17 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ Learn more in our [User Interaction Instrumentation](/platforms/flutter/configur
97
97
98
98
### http.Client Library Instrumentation
99
99
100
-
The `http.Client` instrumentation, once added the `SentryHttpClient` and enabled the [performance](/platforms/flutter/performance/) feature, starts a span out of the active transaction bound to the scope for each HTTP Request. The SDK sets the span `operation` to `http.client` and `description` to request `$METHOD $url`; for example, `GET https://sentry.io`.
100
+
The `http.Client` instrumentation, once added the `SentryHttpClient` and enabled the [performance](/platforms/flutter/performance/) feature, starts a span from an active transaction that's bound to the scope of each HTTP Request. The SDK sets the span `operation` to `http.client` and `description` to request `$METHOD $url`; for example, `GET https://sentry.io`.
101
101
102
102
The span finishes once the request has been executed. The span `status` depends on either the HTTP Response `code` or `SpanStatus.internalError()` if the `code` does not match any of Sentry's `SpanStatus`.
103
103
@@ -107,7 +107,7 @@ For more information see our [SentryHttpClient integration](/platforms/dart/conf
107
107
108
108
### Dio HTTP Library Instrumentation
109
109
110
-
The Dio instrumentation starts a span out of the active transaction bound to the scope for each HTTP request. The SDK sets the span `operation` to `http.client` and the `description` to request `$METHOD $url`. For example, `GET https://sentry.io`.
110
+
The Dio instrumentation starts a span from an active transaction that's bound to the scope of each HTTP request. The SDK sets the span `operation` to `http.client` and the `description` to request `$METHOD $url`. For example, `GET https://sentry.io`.
111
111
112
112
The span finishes once the request has been executed. The span `status` depends on either the HTTP response `code` or `SpanStatus.internalError()` if the `code` does not match any of Sentry's `SpanStatus` options.
113
113
@@ -198,9 +198,9 @@ Future<void> main() async {
198
198
}
199
199
```
200
200
201
-
The `SentryAssetBundle` instrumentation starts a span out of the active transaction bound to the scope for each `load` and `loadString` call. The SDK sets the span `operation` to `file.read`.
201
+
The `SentryAssetBundle` instrumentation starts a span from an active transaction that's bound to the scope of each `load` and `loadString` call. The SDK sets the span `operation` to `file.read`.
202
202
203
-
The `SentryAssetBundle` instrumentation starts a span out of the active transaction bound to the scope for each `loadStructuredData` call. The SDK sets the span `operation` to `serialize`.
203
+
The `SentryAssetBundle` instrumentation starts a span from an active transaction that's bound to the scope of each `loadStructuredData` call. The SDK sets the span `operation` to `serialize`.
204
204
205
205
The `loadStructuredData` is an opt-out feature. The following example shows how to disable it:
The Sentry-specific file I/O implementation starts a span out of the active span, bound to the scope for each file I/O operation. The SDK sets the span `operation` to `file.copy`, `file.write`, `file.delete`, `file.open`, `file.read` or `file.rename`, and `description` to `filename` (for example, `file.txt`).
215
+
The Sentry-specific file I/O instrumentation starts a span from an active transaction that's bound to the scope of each file I/O operation. The SDK sets the span `operation` to `file.copy`, `file.write`, `file.delete`, `file.open`, `file.read` or `file.rename`, and `description` to `filename` (for example, `file.txt`).
216
216
217
217
In addition, the span contains other useful information such as `file.size` (raw number of bytes), `file.path` (an absolute path to the file) and `file.async` (`true` if the called method returns a `Future`, or `false` if it's a `Sync` call) as part of the `data` payload.
218
218
219
-
The span finishes once the operation has been executed. The span `status` is set to `SpanStatus.ok` if successful or `SpanStatus.internalError` if there was any error.
219
+
The span finishes once the operation has been executed. The span `status` is then set to `SpanStatus.ok` if successful, or `SpanStatus.internalError` if there was an error.
220
220
221
-
When the operation throws an `Exception`, Sentry's SDK associates this exception to the running span. If you haven't set the SDK to swallow the exception and capture it, the span and `SentryEvent` will be linked when viewing it on the **Issue Details** page in [sentry.io](https://sentry.io).
221
+
When the operation throws an `Exception`, Sentry's SDK associates it with the running span. If you haven't set the SDK to swallow and capture the exception, the span and `SentryEvent` will be shown as linked on the **Issue Details** page in [sentry.io](https://sentry.io).
222
222
223
223
Learn more about our [file I/O integration](/platforms/dart/configuration/integrations/file/).
224
+
225
+
### sqflite Database Instrumentation
226
+
227
+
The sqflite database instrumentation starts a span from an active transaction that's bound to the scope of each `CRUD` operation.
228
+
229
+
The span finishes once the operation has been executed. The span `status` is then set to `SpanStatus.ok` if successful, or `SpanStatus.internalError` if there was an error.
230
+
231
+
When the operation throws an `Exception`, Sentry's SDK associates it with the running span. If you haven't set the SDK to swallow and capture the exception, the span and `SentryEvent` will be shown as linked on the **Issue Details** page in [sentry.io](https://sentry.io).
232
+
233
+
Learn more about our [sqflite Database Instrumentation](/platforms/flutter/configuration/integrations/sqflite-instrumentation/).
0 commit comments