Skip to content
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

Option "enableAutoNativeBreadcrumbs" doesn't work for iOS (http) breadcrumbs #1873

Closed
endruszeit opened this issue Feb 8, 2024 · 3 comments · Fixed by #1884
Closed

Option "enableAutoNativeBreadcrumbs" doesn't work for iOS (http) breadcrumbs #1873

endruszeit opened this issue Feb 8, 2024 · 3 comments · Fixed by #1884
Assignees

Comments

@endruszeit
Copy link

Platform

Flutter Mobile

Obfuscation

Disabled

Debug Info

Disabled

Doctor

[✓] Flutter (Channel stable, 3.16.8, on macOS 14.2.1 23C71 darwin-arm64, locale en-DE)
• Flutter version 3.16.8 on channel stable at /Users/te/fvm/versions/3.16.8
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 67457e669f (3 weeks ago), 2024-01-16 16:22:29 -0800
• Engine revision 6e2ea58a5c
• Dart version 3.2.5
• DevTools version 2.28.5

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/te/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.12.1

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
• Android Studio at /Applications/Android Studio.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
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] IntelliJ IDEA Community Edition (version 2023.3.3)
• IntelliJ at /Users/te/Applications/IntelliJ IDEA Community Edition.app
• Flutter plugin version 77.3.1
• Dart plugin version 233.13763.5

[✓] IntelliJ IDEA Community Edition (version 2023.2.5)
• IntelliJ at /Users/te/Applications/IntelliJ IDEA Community Edition 2023.2.5.app
• Flutter plugin version 77.1.3
• Dart plugin version 232.10286

[✓] IntelliJ IDEA Ultimate Edition (version EAP IC-241.8102.112)
• IntelliJ at /Users/te/Applications/IntelliJ IDEA Community Edition 2024.1 EAP.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.85.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.80.0

[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.2.1 23C71 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 121.0.6167.139

[✓] Network resources
• All expected network resources are available.

• No issues found!

Version

7.16.0

Steps to Reproduce

As we have some problems with the dart http client on iOS, we use the CupertinoClient with implements the nativ iOS http client.
Because SentryFlutter uses sentryCocoa under the hood and http logging is enabled by default on iOS via swizzling, our http calls automatically are logged, which we want to prevent. (We logging them in the dart code with our own implementation with anonymising).

To do this, we assume disabling enableAutoNativeBreadcrumbs gets us the desired result.

init SentryFlutter with:

await SentryFlutter.init((options) async {
            options.enableAutoNativeBreadcrumbs = false
}

Since in the flutter package the option ist named 'enableAutoNativeBreadcrumbs' and in the sentry-cocoa there is an option 'enableAutoBreadcrumbTracking', maybe the mapping isn't working between them.

Expected Result

Native breadcrumbs (in our case iOS) are disabled.

Actual Result

Breadcrumbs are still logged. Especially http breadcrumbs.

Are you willing to submit a PR?

None

@buenaflor
Copy link
Contributor

Hey thanks for the report, we're taking a look

@denrase
Copy link
Collaborator

denrase commented Feb 19, 2024

@endruszeit We have created #1884 PR to address this. If this gets merged & released, you'd be able to disable the http crumbs on iOS by setting recordHttpBreadcrumbs = false in the Flutter options.

@denrase denrase moved this from Needs Investigation to In Progress in Mobile & Cross Platform SDK Feb 19, 2024
@endruszeit
Copy link
Author

Thank you very much 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants