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 Context #132

Closed
Tracked by #42
bruno-garcia opened this issue Oct 25, 2020 · 24 comments
Closed
Tracked by #42

Support Source Context #132

bruno-garcia opened this issue Oct 25, 2020 · 24 comments

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Oct 25, 2020

Originally posted on flutter: flutter/flutter#63276

Users would like to see the source context around the stack trace. This is a feature supported in Python, JavaScript and other script languages. Native has this support with source bundles.

Relates to (Java, .NET)

@marandaneto
Copy link
Contributor

Currently blocked by dart-lang/sdk#44325

@ueman
Copy link
Collaborator

ueman commented Jun 3, 2021

Currently blocked by dart-lang/sdk#44325

The linked issue mentions that most of it is now possible via --resolve-dwarf-paths.
Is that enough for us to work with?

@augustorsouza
Copy link

Hello guys, any news about this issue? This is really important for us 😬

@marandaneto
Copy link
Contributor

@augustorsouza we'd like to do it but we didn't spend much time investigating it yet, we don't even know if it's supported ootb by the flutter/dart tooling.

just to be clear, this is about showing the source code around the stack trace on sentry, not really related to source maps or anything, it's a nice feature indeed, but would you mind elaborating why is it important? interested in the use case, so we can prioritize.

@marandaneto
Copy link
Contributor

For Web, it works at some degree, see #417 (comment)

@marandaneto
Copy link
Contributor

marandaneto commented May 20, 2022

We'll test if the new flag --resolve-dwarf-paths works or if something else is needed.
dart-lang/sdk#44325 (comment)

@bruno-garcia
Copy link
Member Author

Relates to: getsentry/sentry-java#633

@marandaneto marandaneto moved this from Needs Investigation to Needs More Information in Mobile & Cross Platform SDK Jun 28, 2022
@marandaneto marandaneto removed their assignment Jun 28, 2022
@marandaneto marandaneto moved this from Needs More Information to Blocked in Mobile & Cross Platform SDK Jul 7, 2022
@marandaneto
Copy link
Contributor

@vaind do you know if this is possible after your PRs on Dart/Flutter language/engine?

@vaind
Copy link
Collaborator

vaind commented Oct 27, 2022

@vaind do you know if this is possible after your PRs on Dart/Flutter language/engine?

not out of the top of my head, I'll check

@marandaneto
Copy link
Contributor

marandaneto commented Oct 27, 2022

https://github.com/getsentry/sentry-dart-plugin already supports include_native_sources
we'd need to upload debug symbols with this flag enabled when compiling with --split-debug-info and without, since the process changes a little bit.
My hunch is that it works for Android if --split-debug-info is enabled at least, if disabled not sure.

iOS does not work at all getsentry/team-mobile#42 (comment)

@vaind vaind self-assigned this Oct 27, 2022
@vaind
Copy link
Collaborator

vaind commented Nov 11, 2022

I've managed (with a custom flutter build) to get an issue with absolute paths to sentry.io from Android. Weirdly though, each stacktrace source path contains "dispose" somewhere in the path - see https://sentry.io/organizations/sentry-sdks/issues/3734649639/events/1f7d76d638bf44dd8c069bc0a15c260f/?project=5428562

No idea where that comes from because the stack trace coming from flutter symbolize doesn't have that, see dart-lang/sdk#44325 (comment)

edit: the same "dispose" is in the path on iOS: https://sentry.io/organizations/sentry-sdks/issues/3734649639/events/78f08f5fcd75451db6a64161b4b0133c/?project=5428562 - likely something we're adding along the way

@vaind
Copy link
Collaborator

vaind commented Nov 11, 2022

As for web, I'm confused... this issue linked above says it should work, but for some reason, It doesn't for me: https://sentry.io/organizations/sentry-sdks/issues/3734775388/events/e14d18b2b90c4c97815245624ed4757e/?project=5428562

@marandaneto
Copy link
Contributor

I've managed (with a custom flutter build) to get an issue with absolute paths to sentry.io from Android. Weirdly though, each stacktrace source path contains "dispose" somewhere in the path - see sentry.io/organizations/sentry-sdks/issues/3734649639/events/1f7d76d638bf44dd8c069bc0a15c260f/?project=5428562

No idea where that comes from because the stack trace coming from flutter symbolize doesn't have that, see dart-lang/sdk#44325 (comment)

edit: the same "dispose" is in the path on iOS: sentry.io/organizations/sentry-sdks/issues/3734649639/events/78f08f5fcd75451db6a64161b4b0133c/?project=5428562 - likely something we're adding along the way

Does the SDK set that in the absPath or is that during symbolication on the server? just asking cus I can check with the stack trace team.

@vaind
Copy link
Collaborator

vaind commented Nov 14, 2022

Does the SDK set that in the absPath or is that during symbolication on the server? just asking cus I can check with the stack trace team.

I've checked that last week and didn't find any occurrence of the "dispose" as a string anywhere in the dart, java or native SDK.

@vaind
Copy link
Collaborator

vaind commented Nov 14, 2022

just asking cus I can check with the stack trace team.

please do - I've posted on discord in the dwarf channel (for the lack of a better place) to no avail yet.

@marandaneto
Copy link
Contributor

As for web, I'm confused... this issue linked above says it should work, but for some reason, It doesn't for me: sentry.io/organizations/sentry-sdks/issues/3734775388/events/e14d18b2b90c4c97815245624ed4757e/?project=5428562

There's no uploaded sourcemaps for this release.

@vaind
Copy link
Collaborator

vaind commented Nov 14, 2022

There's no uploaded sourcemaps for this release.

hmm, that looks like an error. SENTRY_RELEASE env var is set in run.sh but maybe not picked up properly by the dart plugin. I'll check

@vaind
Copy link
Collaborator

vaind commented Nov 15, 2022

web - it loaded the cached version from a previous run. when I made sure I use the version I've just built, in-app source codes work fine - https://sentry.io/organizations/sentry-sdks/issues/3741285487/events/0c0429bd595840b6a5117b755a3f0da8/?project=5428562

@marandaneto
Copy link
Contributor

marandaneto commented Jan 30, 2023

@vaind I believe this is completed on our side and it works OOTB when the source context is uploaded, right?
Do we have to document the usage of --resolve-dwarf-paths? do people need to use the master channel of Dart and/or Flutter still?

@vaind
Copy link
Collaborator

vaind commented Jan 30, 2023

@marandaneto not at all, there's an open PR on Flutter to enable this option (flutter/flutter#114767) and there's an UI issue that the sources don't show up on sentry.io (looking into that - https://discord.com/channels/621778831602221064/809895882987536395/1068962301228617830)

@marandaneto
Copy link
Contributor

marandaneto commented Jan 31, 2023

UI work is being tracked here.
I will ping folks for that.

@vaind vaind moved this from Blocked to Backlog in Mobile & Cross Platform SDK Feb 10, 2023
@vaind
Copy link
Collaborator

vaind commented Feb 10, 2023

UI is fixed and the flutter PR has landed as well. In other words, this is "done" and should start working automatically with the next Flutter release. I'll keep my eye on this and check in a couple of days against Flutter master to see if everything seems in order.

Keeping the issue open for now

@kahest
Copy link
Member

kahest commented Mar 1, 2023

@vaind did you manage to check whether this is working now?

@vaind
Copy link
Collaborator

vaind commented Mar 6, 2023

Works with the latest beta tag (but not in with the flutter channel beta yet because that one is on 3.8.0-10.1.pre)

Flutter 3.8.0-17.0.pre • channel unknown • unknown source
Framework • revision 1d17caed66 (6 days ago) • 2023-02-27 23:11:38 -0500
Engine • revision 002b3d7a24
Tools • Dart 3.0.0 (build 3.0.0-277.0.dev) • DevTools 2.22.1

https://sentry-sdks.sentry.io/issues/3979346432/events/a64d54c3c3a44eeba76ddf22f2bf9800/?project=5428562
image

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

No branches or pull requests

7 participants