Better `:in_app_module_allow_list` default
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
@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:
- Check if we're in an umbrella project (
Mix.Project.umbrella?/1). - 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.
- Get the app name for the current Mix project.
- Get the modules with
:application.get_key(app, :modules).
This might not be trivial work, want me to give it a try first?
@whatyouhide yep! Go for it! If you need me to take some of the work load let me know
yep sounds good to me, thx both!
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.
Get the app name for the current Mix project.
This, at compile time, or we just make it explicit