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

Better :in_app_module_allow_list default #800

Open
sl0thentr0py opened this issue Sep 19, 2024 · 3 comments
Open

Better :in_app_module_allow_list default #800

sl0thentr0py opened this issue Sep 19, 2024 · 3 comments
Assignees
Milestone

Comments

@sl0thentr0py
Copy link
Member

sl0thentr0py commented Sep 19, 2024

Currently in_app_module_allow_list defaults to an empty list, so most users don't get good in-app frames marked.
Ruby for instance defaults to a combination of project root + known common directory names
https://github.com/getsentry/sentry-ruby/blob/c3bcfa0401856d9ee7616c95ab9dfe988a89da30/sentry-ruby/lib/sentry/backtrace.rb#L91-L93

@whatyouhide
Copy link
Collaborator

@savhappy we could use :application.get_key(app, :modules) to get all the app modules.

Basically, we could do this if :in_app_module_allow_list is not set:

  1. Check if we're in an umbrella project (Mix.Project.umbrella?/1).
  2. If yes, then we get all the apps from the umbrella and do what's described below, otherwise just do it for the root app.
  3. Get the app name for the current Mix project.
  4. Get the modules with :application.get_key(app, :modules).

This might not be trivial work, want me to give it a try first?

@whatyouhide whatyouhide changed the title Better in_app frames Better :in_app_module_allow_list default Sep 20, 2024
@savhappy
Copy link
Collaborator

@whatyouhide yep! Go for it! If you need me to take some of the work load let me know

@sl0thentr0py
Copy link
Member Author

yep sounds good to me, thx both!

@whatyouhide whatyouhide added this to the 11.0.0 milestone Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants