getsentry / sentry-dart

Sentry SDK for Dart and Flutter
https://sentry.io/for/flutter/
MIT License
746 stars 233 forks source link

Support `split-debug-info` for Flutter Desktop (Linux and Windows) #433

Open ueman opened 3 years ago

ueman commented 3 years ago

We need to test

Those options have not been tested. They might require changes in the SDK and/or on the server. It could be that they already work, and in this case we don't need to do anything.

We need to update the docs after this has been tested.

marandaneto commented 3 years ago

let's add the windows/macos/linux support to this script

https://github.com/getsentry/sentry-dart/blob/main/flutter/example/run.sh

the way of uploading debug files is the same as iOS/Android -> https://github.com/getsentry/sentry-dart/blob/main/flutter/example/run.sh#L58-L60

we need to see if frames are symbolicated, file/function names are available and line number is also correct.

I believe macOS won't work if Flutter has the same format as iOS debug files, but let's try.

@bruno-garcia you may need to help us on Windows, would you be willing to do so? :)

bruno-garcia commented 3 years ago

Didn't seem to work: https://sentry.io/organizations/sentry-sdks/issues/2367778946/?project=5428562&query=is%3Aunresolved

We would need to add the debug_meta with the DLL's build_id of sorts. @jan-auer might have pointers.

image

bruno-garcia commented 3 years ago

image

.so on Windows? They really went all in with ELF it seems

marandaneto commented 3 years ago

indeed, we'd need to install the LoadAndroidImageListIntegration integration for Flutter Desktop, but not only, on Android, sentry-native is also responsible for loading that. That means, either we ship sentry-native for Linux/Windows or we find a way to do it via Native code or ffi

macOS requires that too, so Sentry Cocoa needs to expose a way of getting the debug image list. https://github.com/getsentry/sentry-cocoa/issues/1089

ueman commented 3 years ago

The Flutter docs state that obfuscate is not supported on Windows and Linux.

bruno-garcia commented 3 years ago

Makes it easier. On Windows and Linux we only need to bundle sentry-native to capture native crashes.

marandaneto commented 2 years ago

Removed obfuscate from the title since it's not supported by the tooling anyway.

marandaneto commented 1 year ago

@ueman I believe this is now possible? https://docs.flutter.dev/deployment/obfuscate#supported-targets macOS should work already, I believe, since we already use the Sentry Cocoa SDK as well, after uploading debug symbols of course.

ueman commented 1 year ago

Yes, it seems like it's now possible 🥳

marandaneto commented 1 year ago

Ok removed the limitation https://github.com/getsentry/sentry-docs/pull/7156/files This has been tested already https://github.com/getsentry/sentry-dart/blob/8ccf7824c7322eebfda677dcce9d0ee25614b31a/flutter/example/run.sh#L33

Ghelwig commented 10 months ago

Is there any update on this now that obfuscate is supported on windows? https://docs.flutter.dev/deployment/obfuscate#supported-targets

bruno-garcia commented 10 months ago

I imagine we'd need to add sentry-native to the SDK and capture loaded image info. That with PDB uploading etc. @vaind might know how much work this would entails

alexvoina commented 9 months ago

interested

Ghelwig commented 8 months ago

@bruno-garcia thanks for looking into this, any updates greatly appreciated :)

bruno-garcia commented 8 months ago

I'm not involved directly so I don't think this is planned to be honest, but I'm sure we're happy to get contributions if folks want to get support. @kahest will know what's going on

Ghelwig commented 7 months ago

Just to confirm @kahest is this something that will only be supported with outside contributions or is this something that the Sentry team plans on supporting?

kahest commented 7 months ago

Hey @Ghelwig - we're interested in supporting this, but currently don't have the bandwidth internally. We're happy to work with folks interested in contributing!

JesseRiemens commented 5 months ago

We would really love to see support for flutter build bundle as well. The only way currently is to build a debug build, which is a heavy penalty on an embedded target.