-
-
Notifications
You must be signed in to change notification settings - Fork 239
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
Sentry Flutter SDK is ~3 MB #2184
Comments
Maybe the SDK can support better tree-shaking? For us, we primarily only care about |
@sumanthratna hey thanks for raising this issue. theoretically you could do |
do you know if there are any signifcant changes in earlier versions? |
this is the sentry-cocoa sdk taking up space, so I'm not sure if there is much we can do from the flutter side to optimize this. this might be an issue that could be brought up in the sentry-cocoa repo |
@buenaflor Thanks so much for your replies. I tried using Obviously, this solution is not ideal since now we don't get the features from sentry_flutter, but it's good enough for our App Clip needs. I think the ideal solution would be for Dart+Flutter to support tree-shaking native libraries, so then the Cocoa SDK could be stripped down to what we need but that's probably out of scope for you all. As a workaround, maybe splitting the Cocoa SDK into smaller SDKs with specific functionalities might allow Dart tree shaking to strip un-needed native code from the build. Feel free to close since I don't think there are any easy solutions for this on your end. Thanks for the help! |
@sumanthratna modularizing the sentry-cocoa SDK is a long-term goal we have, but as you point out, not in the immediate scope for us. We definitely appreciate your input in any case. I'll close this issue for now, please leave a comment if there's a reason to reopen. |
@sumanthratna we have released sentry-dart/flutter |
Tried Sentry.init instead of SentryFlutter.init in our App Clip but I cannot anymore get anythin visible in the sentry website. Not even in releases. With SentryFlutter.init it works.
|
Do you mean you can't get issues to show up? There are some limitations though since Sentry.init doesn't support release health compared to SentryFlutter.init but that shouldn't affect your issue |
Yes - I cannot seem to see issues. Assuming the exceptions and error logs should appear normally from Flutter? And yes in "Releases" I cannot see either |
Okay got it, that does not seem right, errors should show up in your sentry issues list. could you enable debug and paste some of the logs? |
@johannesvuorinen which sentry dart version are you using? |
I am using the latest one and finally found the reason. This was needed: Apple disallows different things in App Clips like sockets so devs need to use Apple's own network framework which the cupertino_http package enables. |
Platform
Flutter Mobile
Obfuscation
Enabled
Debug Info
Enabled
Doctor
Hi all,
We're big fans of Sentry but are unfortunately might need to move away from it: we're building an iOS App Clip (which constrains us to a ~15 MB uncompressed+thinned .ipa file). Flutter is ~10 MB and Sentry is ~3 MB (which is much larger than we thought it would be), leaving us with very little room to implement actual App Clip functionality, leveraging Flutter plugins, etc.
Here's a section of the output of
zipinfo -m RunnerAppClip.ipa
:(the fourth column is number of bytes)
As you can see, Sentry is ~3 MB. Are there optimizations that can be made?
Version
8.4.0
Steps to Reproduce
flutter create my_app
flutter pub add sentry_flutter
and callSentryFlutter.init
inmain
flutter build ipa --release --export-method development --analyze-size
open build/ios/archive/*.xcarchive
open the resulting directory and open
App Thinning Size Report.txt
and see the uncompressed sizeWe're happy to help on reducing the SDK size, but may need some guidance on how to approach this.
Expected Result
N/A
Actual Result
N/A
Are you willing to submit a PR?
Yes
The text was updated successfully, but these errors were encountered: