-
Notifications
You must be signed in to change notification settings - Fork 2
Integrate advanced Bugsee features #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
koukibadr
wants to merge
19
commits into
main
Choose a base branch
from
config/bk/integrate-advanced-bugsee
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
4d9287a
feat: implement bugsee data obscure from reported videos
koukibadr 621f58e
feat: customize logs, traces and events reported to Bugsee dashboard
koukibadr 0f12bb3
feat: implement custom attributes and attach file bugsee features
koukibadr 12f2d65
feat: implement global bugsee exception handler
koukibadr 0f27491
chore: add flutter framework rendering error interceptor handler
koukibadr 7f20a67
docs: update project changelog
koukibadr ac885a0
chore: update bugsee manager singleton registration in main file
koukibadr f6a6938
chore: add mock attribute to bugsee manager initialization
koukibadr 9906020
chore: add platform check when intializing Bugsee
koukibadr e7cb678
docs: add Bugsee implementation documentation
koukibadr 934f7f6
chore: update Bugsee integration documentation and event caputring me…
koukibadr 035775e
chore: create global exception interceptor
koukibadr b545120
Merge branch 'main' into config/bk/integrate-advanced-bugsee
koukibadr 5ac9d49
chore: update code documentation in exception interceptor
koukibadr b87addb
chore: update production env variables
koukibadr cced807
chore: update changelog documentation
koukibadr f8182fc
Merge branch 'main' into config/bk/integrate-advanced-bugsee
koukibadr 99049c3
Merge branch 'main' into config/bk/integrate-advanced-bugsee
carlh98 c754cc7
Merge branch 'main' into config/bk/integrate-advanced-bugsee
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import 'package:flutter_test/flutter_test.dart'; | ||
|
|
||
| /// Test all Bugsee setup features | ||
| Future<void> bugseeSetupTest() async { | ||
| testWidgets( | ||
| 'Test Bugsee configuration', | ||
| (tester) async {}, | ||
|
koukibadr marked this conversation as resolved.
Outdated
|
||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,59 @@ | ||
| final class BugseeConfigurationData { | ||
| import 'package:equatable/equatable.dart'; | ||
|
|
||
| final class BugseeConfigurationData extends Equatable { | ||
| /// Gets whether the Bugsee SDK is enabled or not. if [Null] it fallbacks to a new installed app so it will be enabled. | ||
| final bool? isBugseeEnabled; | ||
|
|
||
| /// Indicate whether the video capturing feature in Bugsee is enabled or not. | ||
| final bool? isVideoCaptureEnabled; | ||
|
|
||
| /// Indicate whether bugsee obscure application data in videos and images or not. | ||
|
koukibadr marked this conversation as resolved.
Outdated
koukibadr marked this conversation as resolved.
Outdated
koukibadr marked this conversation as resolved.
Outdated
|
||
| final bool? isDataObscured; | ||
|
|
||
| /// Indicate whether logs are collected or not. | ||
| final bool? isLogCollectionEnabled; | ||
|
|
||
| /// Indicate whether logs are filtred during reports or not. | ||
| final bool? isLogsFilterEnabled; | ||
|
|
||
| /// Indicate whether attaching file in the Bugsee report is enabled or not | ||
| final bool? attachLogFileEnabled; | ||
|
|
||
| const BugseeConfigurationData({ | ||
| required this.isBugseeEnabled, | ||
| required this.isVideoCaptureEnabled, | ||
| this.isBugseeEnabled, | ||
| this.isVideoCaptureEnabled, | ||
| this.isDataObscured, | ||
| this.isLogCollectionEnabled, | ||
| this.isLogsFilterEnabled, | ||
| this.attachLogFileEnabled, | ||
| }); | ||
|
|
||
| BugseeConfigurationData copyWith({ | ||
| bool? isBugseeEnabled, | ||
| bool? isVideoCaptureEnabled, | ||
| bool? isDataObscured, | ||
| bool? isLogCollectionEnabled, | ||
| bool? isLogsFilterEnabled, | ||
| bool? attachLogFileEnabled, | ||
| }) => | ||
| BugseeConfigurationData( | ||
| isBugseeEnabled: isBugseeEnabled ?? this.isBugseeEnabled, | ||
| isVideoCaptureEnabled: | ||
| isVideoCaptureEnabled ?? this.isVideoCaptureEnabled, | ||
| isDataObscured: isDataObscured ?? this.isDataObscured, | ||
| isLogCollectionEnabled: | ||
| isLogCollectionEnabled ?? this.isLogCollectionEnabled, | ||
| isLogsFilterEnabled: isLogsFilterEnabled ?? this.isLogsFilterEnabled, | ||
| attachLogFileEnabled: attachLogFileEnabled ?? this.attachLogFileEnabled, | ||
| ); | ||
|
|
||
| @override | ||
| List<Object?> get props => [ | ||
| isBugseeEnabled, | ||
| isVideoCaptureEnabled, | ||
| isDataObscured, | ||
| isLogCollectionEnabled, | ||
| isLogsFilterEnabled, | ||
| attachLogFileEnabled, | ||
| ]; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| import 'package:equatable/equatable.dart'; | ||
|
|
||
| enum ConfigErrorEnum { | ||
| invalidReleaseMode(error: 'Bugsee is disabled in debug mode'), | ||
| invalidToken(error: 'Invalid token, cannot start Bugsee reporting'), | ||
| invalidPlatform(error: 'Bugsee cannot be configured on this platform'); | ||
|
|
||
| final String error; | ||
| const ConfigErrorEnum({ | ||
| required this.error, | ||
| }); | ||
| } | ||
|
|
||
| final class BugseeConfigState extends Equatable { | ||
| /// Indicate if the app require a restart to reactivate the bugsee configurations | ||
|
koukibadr marked this conversation as resolved.
Outdated
|
||
| /// | ||
| /// `true` only if `isConfigurationValid == true` and bugsee is turned on | ||
| final bool isRestartRequired; | ||
|
|
||
| /// Indicate if bugsee is enabled or not | ||
| /// by default bugsee is enabled if `isConfigurationValid == true`. | ||
| final bool isBugseeEnabled; | ||
|
|
||
| /// Indicate whether video capturing is enabled or not. | ||
| /// enabled by default if `isBugseeEnabled == true`. | ||
| /// | ||
| /// cannot be true if `isBugseeEnabled == false`. | ||
| final bool isVideoCaptureEnabled; | ||
|
|
||
| /// Indicate if bugsee configuration is valid | ||
|
koukibadr marked this conversation as resolved.
Outdated
|
||
| /// config is valid if app in release mode and the provided token is valid | ||
| /// following the [bugseeTokenFormat] regex. | ||
| final bool isConfigurationValid; | ||
|
|
||
| /// Indicate whether data is obscured in report videos | ||
| /// | ||
| /// cannot be true if `isBugseeEnabled == false`. | ||
| final bool isDataObscured; | ||
|
|
||
| /// Indicate whether log will be collected during Bugsee reporting or not | ||
| /// by default logs are collected but filterd. | ||
| /// | ||
| /// This value is initialized from [dotenv.env] and shared prefs storage. | ||
| final bool isLogCollectionEnabled; | ||
|
|
||
| /// Indicate whether log will be filterd or not | ||
| /// by default all logs are filted using [bugseeFilterRegex] defined in [BugseeManager] | ||
| /// | ||
| /// This value is initialized from [dotenv.env] map and shared prefs storage. | ||
| final bool isLogFilterEnabled; | ||
|
|
||
| /// Indicate whether Bugsee will attach the log file when reporting crashes/exceptions | ||
| /// or not | ||
| /// | ||
| /// The initial value is taken from [dotenv.env] and shared prefs. | ||
| /// By default it's enabled. | ||
| final bool attachLogFile; | ||
|
|
||
| /// Indicate the configuration error type (debug, invalid token or invalid platform) | ||
| final ConfigErrorEnum? configErrorEnum; | ||
|
|
||
| const BugseeConfigState({ | ||
| this.isRestartRequired = false, | ||
| this.isBugseeEnabled = false, | ||
| this.isVideoCaptureEnabled = false, | ||
| this.isConfigurationValid = false, | ||
| this.isDataObscured = false, | ||
| this.isLogCollectionEnabled = false, | ||
| this.isLogFilterEnabled = false, | ||
| this.attachLogFile = false, | ||
| this.configErrorEnum, | ||
| }); | ||
|
|
||
| BugseeConfigState copyWith({ | ||
| bool? isRestartRequired, | ||
| bool? isBugseeEnabled, | ||
| bool? isVideoCaptureEnabled, | ||
| bool? isConfigurationValid, | ||
| bool? isDataObscured, | ||
| bool? isLogCollectionEnabled, | ||
| bool? isLogFilterEnabled, | ||
| bool? attachLogFile, | ||
| ConfigErrorEnum? configErrorEnum, | ||
| }) => | ||
| BugseeConfigState( | ||
| isRestartRequired: isRestartRequired ?? this.isRestartRequired, | ||
| isBugseeEnabled: isBugseeEnabled ?? this.isBugseeEnabled, | ||
| isConfigurationValid: isConfigurationValid ?? this.isConfigurationValid, | ||
| isDataObscured: isDataObscured ?? this.isDataObscured, | ||
| isLogFilterEnabled: isLogFilterEnabled ?? this.isLogFilterEnabled, | ||
| attachLogFile: attachLogFile ?? this.attachLogFile, | ||
| isLogCollectionEnabled: | ||
| isLogCollectionEnabled ?? this.isLogCollectionEnabled, | ||
| isVideoCaptureEnabled: | ||
| isVideoCaptureEnabled ?? this.isVideoCaptureEnabled, | ||
| configErrorEnum: configErrorEnum ?? this.configErrorEnum, | ||
| ); | ||
|
|
||
| @override | ||
| List<Object?> get props => [ | ||
| isRestartRequired, | ||
| isBugseeEnabled, | ||
| isVideoCaptureEnabled, | ||
| isConfigurationValid, | ||
| isDataObscured, | ||
| ]; | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.