-
-
Notifications
You must be signed in to change notification settings - Fork 273
Description
Platform:
- Dart
- Flutter Android or iOS
- Flutter Web
IDE:
- VSCode
- IntelliJ/AS
- XCode
- Other, which one?
split-debug-info and obfuscate (Flutter Android or iOS) or CanvasKit (Flutter Web):
- Enabled
- Disabled
Platform installed with:
- pub.dev
- GitHub
Output of the command flutter doctor -v
below:
flutter doctor -v
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.0.1 22A400 darwin-arm, locale en-AU)
• Flutter version 3.3.10 on channel stable at /path/to/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 135454af32 (2 months ago), 2022-12-15 07:36:55 -0800
• Engine revision 3316dd8728
• Dart version 2.18.6
• DevTools version 2.15.0
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at /path/to/Library/Android/sdk
• Platform android-33, build-tools 33.0.1
• Java binary at: /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (Temurin)(build 1.8.0_302-b08)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode-14.2.0.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio
• Android Studio at /path/to/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-1/222.4459.24.2221.9601061/Android Studio Preview.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.2)
• IntelliJ at /path/to/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/223.8617.56/IntelliJ IDEA.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.75.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.58.0
[✓] Connected device (3 available)
• Pixel 2 (mobile) • <device-id> • android-arm64 • Android 11 (API 30)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.0.1 22A400 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 110.0.5481.100
[!] HTTP Host Availability
✗ HTTP host "https://cocoapods.org/" is not reachable. Reason: Failed to connect to host in 10 seconds
! Doctor found issues in 6 categories.
The version of the SDK (See pubspec.lock):
6.20.1
I have the following issue:
Potentially related to #982 , manipulating a breadcrumb within beforeBreadcrumb
has no effect when copyWith()
is used.
In our current project we pass classes as navigation arguments instead of Map<String, dynamic>
, and some of these classes contain PII/verbose values which we don't want or need in our breadcrumbs. Since Sentry will invoke toString()
on these nav arg models to capture within breadcrumb data, we can't parse this string back to a class to nullify/remove values we don't want sent, and therefor need to manually remove the from_arguments
/to_arguments
key pairs so can we instead attach our sanitised data to breadcrumbs via the additionalnfoProvider
callback of SentryNavigatorObserver
.
Directly mutating the breadcrumb
itself rather than returning a copy works as intended, however this isn't documented to be expected behaviour, nor does it feel like a good way to achieve this.
Breadcrumb? sanitiseBreadcrumb(Breadcrumb? breadcrumb, {dynamic hint}) {
breadcrumb?.data?.remove('from_arguments');
breadcrumb?.data?.remove('to_arguments');
return breadcrumb;
}
Steps to reproduce:
Breadcrumb? sanitiseBreadcrumb(Breadcrumb? breadcrumb, {dynamic hint}) {
final sanitisedData = Map<String, dynamic>.from(breadcrumb?.data ?? {})
..remove('from_arguments')
..remove('to_arguments');
return breadcrumb?.copyWith(data: sanitisedData);
}
await SentryFlutter.init(
(options) {
options
// DSN setup etc ...
..beforeBreadcrumb = sanitiseBreadcrumb;
},
);
Actual result:
from_arguments
/to_arguments
key value pairs are still logged to Sentry.
Expected result:
from_arguments
/to_arguments
should be removed from the breadcrumb.
Metadata
Metadata
Assignees
Labels
Projects
Status