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

Support source code context #42

Closed
9 tasks done
marandaneto opened this issue Aug 1, 2022 · 16 comments
Closed
9 tasks done

Support source code context #42

marandaneto opened this issue Aug 1, 2022 · 16 comments

Comments

@marandaneto
Copy link

marandaneto commented Aug 1, 2022

Description

iOS:
By default, source code context isn't uploaded if using sentry-cli upload-dsym.
Docs: https://docs.sentry.io/platforms/apple/guides/ios/dsym/

If this works on iOS, we need to patch the docs to use upload-dif with --include-sources
We likely need to patch https://github.com/getsentry/sentry-fastlane-plugin/ to support this flag too.

include-sources should be opt-in similar on Android.
https://docs.sentry.io/platforms/android/gradle/
See uploadNativeSymbols

Java/Android

  1. Effort: Large Impact: Large Platform: Java enhancement
    adinauer

iOS

React Native

  1. Platform: React-Native Status: Backlog
  2. Effort: Small Impact: Small Platform: React-Native Status: Backlog iOS

Dart/Flutter

  1. Effort: Large Impact: Medium Platform: Dart enhancement product
    vaind

.NET

  1. Effort: Large Feature Impact: Large Platform: .NET
  2. Android Bug MAUI Platform: .NET
    mattjohnsonpint

Other relevant items

Related Project: Source Context Adoption

Not part of the initial roadmap, tbd if/when these are tackled:

@marandaneto
Copy link
Author

@brustolin is going to check if Sentry-CLI is able to upload source code context for iOS, if it works, we'd add to the other plugins as well.

@marandaneto
Copy link
Author

@brustolin is going to check if Sentry-CLI is able to upload source code context for iOS, if it works, we'd add to the other plugins as well.

@philipphofmann or @brustolin any updates on this?

@brustolin
Copy link

According to Kamil Sentry-CLI is able to upload source code context.
https://docs.sentry.io/platforms/apple/guides/ios/data-management/debug-files/source-context/

@marandaneto
Copy link
Author

Source code context does not work for iOS when using upload-dif and --include-sources, its either a limitation of Sentry itself, or there's a bug if it should have worked OOTB.
@kamilogorek do you know which team is responsible for that? Apparently, the CLI did its job, I saw plenty of uploaded symbols with the feature sources.

@kamilogorek
Copy link

Do we have an example where it doesn't work? Can we get debug logs for it?
Asking, as if we do upload sources, then we should see that explicitly mentioned in the logs.

@marandaneto
Copy link
Author

Do we have an example where it doesn't work? Can we get debug logs for it? Asking, as if we do upload sources, then we should see that explicitly mentioned in the logs.

I'll let @philipphofmann or @brustolin handle this since this is iOS.

@philipphofmann
Copy link
Member

@kamilogorek, I have information from a customer that I can't share here, but you can have a look on Notion.

@eric
Copy link

eric commented Nov 10, 2022

It was working when I was releasing to Apple with bitcode, downloading the symbols and re-uploading those to Sentry. Now that we are no longer compiling with bitcode and uploading symbols directly, it no longer displays the source context.

@philipphofmann
Copy link
Member

@kamilogorek, see the reply from @eric. I think it could be related.

@eric
Copy link

eric commented Dec 6, 2022

Has there been any progress on uploading source for iOS/tvOS?

@philipphofmann
Copy link
Member

@eric, sorry for the late reply. I tried source context with our sample iOS app by adding the include_sources to sentry_upload_dif in Fastlane and also with sentry-cli by using --include-sources, and both worked. I think the docs are a bit misleading, and I will fix them. Creating a source bundle doesn't work for iOS, you have to use --include-sources when uploading the dSYMs.

@eric
Copy link

eric commented Jan 3, 2023

@philipphofmann I'm confused why the documentation on the website still says to use sentry_upload_dsym under the Without Bitcode section.

When we moved away from uploading Bitcode to Apple (because it is deprecated) it appears we moved from using sentry_upload_dif to using sentry_upload_dsym because that's what the documentation said to do.

Can we still use sentry_upload_dif without Bitcode? Can we use it without downloading the dSYMs from Apple?

I guess that's the reason why Sentry stopped giving us source context in September. We followed the instructions and haven't had them ever since.

@philipphofmann
Copy link
Member

Creating source bundles for xcarchives is not working; see getsentry/sentry-cli#1425

@philipphofmann
Copy link
Member

@eric, please use sentry_upload_dif and add include_sources: true. Then it should work. I'm going to update the docs.

@philipphofmann
Copy link
Member

Docs PR getsentry/sentry-docs#6015

@marandaneto
Copy link
Author

Relates to getsentry/sentry-docs#6553 as well

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

No branches or pull requests

7 participants