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
This project include [Bugsee](https://www.bugsee.com/) reporting and Logging, for both Android and iOS apps.
4
-
Bugsee lets you monitor and get instant log of unhandled exceptions with traces, events, stacktrace and videos/screenshots of the reported exception. More features are provided by Bugsee like data obscuration and log filter.
5
-
6
-
For this implementation we've used [bugsee_flutter](https://pub.dev/packages/bugsee_flutter) package.
7
-
8
-
- By default only release apps will have Bugsee reporting enabled, to enable Bugsee in debug mode add your token in `launch.json` add remove the check on debug mode in `BugseeManager` class.
9
-
-**Token**
10
-
- Generate your token in order to test Bugsee logging and reporting
11
-
- Head to [Bugsee dashboard](https://www.bugsee.com/)
12
-
- Create a new account
13
-
- Create a new Android/iOS (choose Flutter framework)
14
-
- Copy-paste the generated token into `launch.json`
15
-
16
-
17
-
## 1) Features
18
-
19
-
In this project we've implemented the following features of Bugsee:
20
-
-[Manual invocation](https://docs.bugsee.com/sdk/flutter/manual/) helpfull for developers to test their Bugsee integration and setup with new tokens.
21
-
-[Custom data](https://docs.bugsee.com/sdk/flutter/custom/) custom data could be attached to the logged exceptions (emails or other type of data)
22
-
-[Email](https://docs.bugsee.com/sdk/flutter/custom/#:~:text=Adding%20custom%20data-,User%20email,-When%20you%20already) this will identify the user whom experienced the exception/bug this will update the exception dashboard item from anonymous to the user's mail this data will be reported with every logged exception unless the app is deleted or removed manually.
23
-
-[Attributes](https://docs.bugsee.com/sdk/flutter/custom/#:~:text=User/Session%20attributes) attributes related to the user info, will be reported with every logged exception unless the app is deleted or removed manually.
24
-
-[Traces](https://docs.bugsee.com/sdk/flutter/custom/#:~:text=them%0ABugsee.clearAllAttributes()%3B-,Custom%20traces,-Traces%20may%20be) helpfull when developer want to track the change of specific value before the logging of the exception.
25
-
-[Events](https://docs.bugsee.com/sdk/flutter/custom/#:~:text=Custom%20events-,Events,-are%20identified%20by) highlight on which event the exception is logged, accept also json data attached to it.
26
-
-[Exception Logging](https://docs.bugsee.com/sdk/flutter/logs/) the app automatically log every unhandled exception: Dart SDK exception are related to data or logic errors and Flutter SDK errors that are related to layout and rendering issues. The implementation also offer an API to manually log an exception with traces and events.
27
-
-[Video Capturing](https://docs.bugsee.com/sdk/flutter/privacy/video/) video capturing is by default enabled in this project, but it can be turned off using the `videoEnabled` flag in the launchOptions object for Android and iOS.
28
-
-[Log reporting](https://docs.bugsee.com/sdk/flutter/privacy/logs/) all logs are filtered by default using the `_filterBugseeLogs` method, this can be turned off from the app or by removing the call to `setLogFilter` Bugsee method.
29
-
-[Obscure Data](https://docs.bugsee.com/sdk/flutter/privacy/video/#:~:text=Protecting%20flutter%20views): data obscuration is by default enabled in the project in order to protect user-related data from being leaked through captured videos.
30
-
31
-
**Default configurations:**
32
-
Data obscuration, log collection, log filter and attaching log file features are initialized from the `.env.staging` file.
33
-
```
34
-
BUGSEE_IS_DATA_OBSCURE=true
35
-
BUGSEE_DISABLE_LOG_COLLECTION=true
36
-
BUGSEE_FILTER_LOG_COLLECTION=false
37
-
BUGSEE_ATTACH_LOG_FILE=true
1
+
# Bugsee Integration Documentation
2
+
3
+
This document provides a comprehensive guide to integrating and using **Bugsee** in your mobile application. Bugsee is a powerful tool for monitoring and debugging your app by capturing and reporting unhandled exceptions, providing insights into app crashes, user interactions, and more.
4
+
5
+
## **Overview**
6
+
7
+
**Bugsee** helps developers quickly identify and troubleshoot crashes, bugs, and performance issues in mobile applications. By integrating Bugsee, developers can capture detailed logs, screen recordings, and contextual data (such as user attributes) to understand and fix issues faster.
8
+
9
+
---
10
+
11
+
## **Features**
12
+
13
+
This implementation of Bugsee leverages the following features to provide robust exception tracking and reporting:
14
+
15
+
### 1. **Manual Invocation**
16
+
- Developers can trigger Bugsee for testing purposes or to verify the integration. You can also use different tokens for testing in different environments.
- Bugsee automatically captures screen recordings of user interactions that lead to exceptions. This helps developers visually understand what the user was doing when the issue occurred.
36
+
- You can disable video capture by setting the `videoEnabled` flag.
- Sensitive user data (like passwords or personal information) in captured videos is automatically obscured by default to prevent leaks.
46
+
- Documentation: [Bugsee Data Obscuration](https://docs.bugsee.com/sdk/flutter/installation/)
47
+
48
+
---
49
+
50
+
## **Default Configurations**
51
+
52
+
Bugsee’s behavior can be controlled via environment settings, particularly for data obscuration, log collection, and file attachment. The default configurations are defined in the `.env.staging` file as follows:
53
+
54
+
```env
55
+
BUGSEE_IS_DATA_OBSCURE=true # Enables data obscuration for captured videos
56
+
BUGSEE_DISABLE_LOG_COLLECTION=true # Disables log collection by default
57
+
BUGSEE_FILTER_LOG_COLLECTION=false # Allows all logs unless manually filtered
58
+
BUGSEE_ATTACH_LOG_FILE=true # Attaches log files with Bugsee reports
38
59
```
39
60
40
-
## 2) Implementation
41
-
-[Bugsee Manager](../src/app/lib/business/bugsee/bugsee_manager.dart): a service class that handle the Bugsee intialization, capturing logs, customize Bugsee fields and features (Video capture, data obscure, logs filter...) .
42
-
-[Bugsee Config State](../src/app/lib/business/bugsee/bugsee_config_state.dart): a state class holds all the actual Bugsee features status (whether enabled or not).
43
-
-[Bugsee Repository](../src/app/lib/access/bugsee/bugsee_repository.dart): save and retrieve Bugsee configuration from the shared preference storage.
44
-
-[Bugsee saved configuration](../src/app/lib/access/bugsee/bugsee_configuration_data.dart): holds the Bugsee saved configuration in shared preference, used in [Bugsee Manager](../src/app/lib/business/bugsee/bugsee_manager.dart) to initialize [Bugsee Config State](../src/app/lib/business/bugsee/bugsee_config_state.dart).
61
+
Ensure that these values are properly set for different environments (e.g., staging, production).
62
+
63
+
---
64
+
65
+
## **Implementation Details**
66
+
67
+
The Bugsee integration consists of several key components for handling configuration, exception tracking, and reporting.
@@ -93,49 +138,69 @@ the `inteceptExceptions` and `inteceptRenderExceptions` recerespectively report
93
138
}
94
139
```
95
140
96
-
### Manually invoke report dialog
141
+
### **Manually Reporting Issues**
97
142
98
-
To manually display the report dialog, you call the `showCaptureLogReport` method from the `BugseeManager` class.
143
+
You can manually trigger Bugsee to capture logs and display a report dialog using the `showCaptureLogReport` method:
99
144
100
145
```dart
101
146
final bugseeManager = Get.I.get<BugseeManager>();
102
-
bugseeManger.showCaptureLogReport();
147
+
bugseeManager.showCaptureLogReport();
103
148
```
104
149
150
+
This is useful for debugging specific scenarios or reporting custom issues.
105
151
106
-
### Manually log an exception
152
+
### **Manually Logging Exceptions**
107
153
108
-
To manually log an exception, you call the `logException` method from the `BugseeManager` class. You can add traces and events to the reported exception.
154
+
To manually log an exception (with or without additional traces), use the `logException` method:
for other attributes you can use `addAttributes` with a map where key is the attribute name and value is the attribute value. To clear these attributes use `clearAttribute` and pass the attribute name to it.
181
+
-**Clear Email Attribute**:
128
182
129
183
```dart
130
-
final bugseeManager = Get.I.get<BugseeManager>();
131
-
bugseeManger.addAttributes({
132
-
'name': 'john',
133
-
'age': 45,
184
+
bugseeManager.clearEmailAttribute();
185
+
```
186
+
187
+
-**Add Custom Attributes**:
188
+
189
+
You can also add custom key-value pairs as additional attributes to enrich the exception reports:
The Bugsee token is injected directly in the azure devops pipeline when building the Android/iOS app for release mode in the [Android Build Job](../build/steps-build-android.yml) and [iOS Build Job](../build/steps-build-ios.yml) under the `multiDartDefine` parameter.
0 commit comments