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

Closed
sl0thentr0py opened this issue Sep 19, 2024 · 5 comments · Fixed by #854
Closed

Better :in_app_module_allow_list default #800

sl0thentr0py opened this issue Sep 19, 2024 · 5 comments · Fixed by #854
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
@solnic solnic assigned solnic and unassigned savhappy Jan 27, 2025
@solnic
Copy link
Collaborator

solnic commented Jan 27, 2025

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

@whatyouhide could you tell me what would be a good way of resolving what app is? It seems to me that we should fill in the in_app_module_allow_list setting when Sentry app starts via put_config but I am not sure how to resolve app there.

@whatyouhide
Copy link
Collaborator

Get the app name for the current Mix project.

This, at compile time, or we just make it explicit

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

Successfully merging a pull request may close this issue.

5 participants