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

Add option to whitelist specific paths as 'in app' #909

Merged

Conversation

mfrischbutter
Copy link
Contributor

@mfrischbutter mfrischbutter commented Oct 22, 2019

To bypass the default value for in_app_exclude from getsentry/sentry-laravel, I added the in_app_whitelist option.

The problem is that our own vendor/packages do not appear in the 'in app' stackstrace.

With this option it is possible to whitelist subfolders if you don't want to exclude all folders individually.

To use this option just add in_app_whitelist to your sentry configuration and define some relative paths as an array.

Resolves #595

Copy link
Collaborator

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time of preparing this contribution. I'll list some suggestion to further it:

  • since this SDK follows Sentry's Unified APIs specification, this should become the implementation of the missing in-app-include option
  • you should add tests to verify your new feature
  • you should add a new entry in the changelog

@mfrischbutter mfrischbutter force-pushed the add-in_app_whitelist-configuration branch 2 times, most recently from a29b524 to a59af72 Compare October 22, 2019 12:35
CHANGELOG.md Outdated Show resolved Hide resolved
src/Stacktrace.php Outdated Show resolved Hide resolved
src/Options.php Show resolved Hide resolved
src/Options.php Show resolved Hide resolved
src/Stacktrace.php Show resolved Hide resolved
src/Stacktrace.php Outdated Show resolved Hide resolved
src/Stacktrace.php Outdated Show resolved Hide resolved
tests/OptionsTest.php Outdated Show resolved Hide resolved
tests/OptionsTest.php Outdated Show resolved Hide resolved
tests/StacktraceTest.php Outdated Show resolved Hide resolved
tests/StacktraceTest.php Show resolved Hide resolved
tests/StacktraceTest.php Outdated Show resolved Hide resolved
@ste93cry ste93cry changed the base branch from master to develop October 22, 2019 14:07
@ste93cry
Copy link
Collaborator

Since this is a new feature it must target the develop branch, thus the PR needs a rebase

@mfrischbutter mfrischbutter force-pushed the add-in_app_whitelist-configuration branch from a59af72 to 585966a Compare October 23, 2019 08:23
@ste93cry ste93cry added this to the 2.3 milestone Nov 8, 2019
mfrischbutter pushed a commit to mogic-le/sentry-php that referenced this pull request Nov 12, 2019
@mfrischbutter mfrischbutter force-pushed the add-in_app_whitelist-configuration branch from 585966a to 898c185 Compare November 12, 2019 12:33
mfrischbutter pushed a commit to mogic-le/sentry-php that referenced this pull request Nov 12, 2019
@mfrischbutter mfrischbutter force-pushed the add-in_app_whitelist-configuration branch from 898c185 to 4df49da Compare November 12, 2019 12:36
mfrischbutter pushed a commit to mogic-le/sentry-php that referenced this pull request Nov 12, 2019
@mfrischbutter mfrischbutter force-pushed the add-in_app_whitelist-configuration branch from 4df49da to 717e0b9 Compare November 12, 2019 12:45
mfrischbutter pushed a commit to mogic-le/sentry-php that referenced this pull request Nov 12, 2019
@mfrischbutter mfrischbutter force-pushed the add-in_app_whitelist-configuration branch from 6370823 to 64ce9b8 Compare November 12, 2019 13:00
mfrischbutter pushed a commit to mogic-le/sentry-php that referenced this pull request Nov 13, 2019
@mfrischbutter mfrischbutter force-pushed the add-in_app_whitelist-configuration branch from 64ce9b8 to 1351b0d Compare November 13, 2019 09:32
mfrischbutter pushed a commit to mogic-le/sentry-php that referenced this pull request Nov 13, 2019
@mfrischbutter mfrischbutter force-pushed the add-in_app_whitelist-configuration branch from 1351b0d to 222e93c Compare November 13, 2019 09:39
tests/StacktraceTest.php Outdated Show resolved Hide resolved
@ste93cry
Copy link
Collaborator

ste93cry commented Dec 4, 2019

@mfrischbutter I did some changes to your PR but it seems that I cannot push them because I don't have permissions for the branch of this PR. Would you be so kind to check if the "Allow edits from maintainers" flag is checked?

@mfrischbutter
Copy link
Contributor Author

@ste93cry
Yeah, the checkbox was already checked. Maybe i should change anything inside my repository or is the checkbox enough?

@Jean85
Copy link
Collaborator

Jean85 commented Dec 9, 2019

I can edit the files from the web interface, so the permissions are ok.

mfrischbutter pushed a commit to mogic-le/sentry-php that referenced this pull request Dec 10, 2019
@mfrischbutter mfrischbutter force-pushed the add-in_app_whitelist-configuration branch from 9e7aad8 to 00658f5 Compare December 10, 2019 08:31
@mfrischbutter
Copy link
Contributor Author

I just rebased onto develop.
Is there anything left to do?

@ste93cry
Copy link
Collaborator

Yeah, the checkbox was already checked. Maybe i should change anything inside my repository or is the checkbox enough?

It should be enough, maybe the fact that the PR is not a branch owned by you but by another user (@mogic-le) is the problem as I get 403 as soon as I try to push

I can edit the files from the web interface, so the permissions are ok.

I just tried and yes, it opens the web editor although I didn't try to save any change

Is there anything left to do?

There are my changes that I would like to merge with this PR if everything is ok for you. I pushed the commit to my own fork, if you can cherry-pick it here and give your opinion it would be cool

@ste93cry
Copy link
Collaborator

@mfrischbutter are you willing to rebase and merge the changes from my fork so that we can proceed with a new (and hopefully final) review of the code?

@mfrischbutter mfrischbutter force-pushed the add-in_app_whitelist-configuration branch from 00658f5 to 47596c9 Compare January 2, 2020 08:48
@mfrischbutter
Copy link
Contributor Author

Sorry it took a while, thanks for your patience.
I pushed your commit @ste93cry. The code looks very good and all the test passed successfully on the first try. I have not made any changes.

Copy link
Collaborator

@ste93cry ste93cry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me it looks good, thank you for the work. LGTM

Copy link
Collaborator

@stayallive stayallive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 thank you for your work and patience!

Copy link
Collaborator

@Jean85 Jean85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the hard work!

@ste93cry ste93cry merged commit 9e9a5cd into getsentry:develop Jan 2, 2020
@mfrischbutter mfrischbutter deleted the add-in_app_whitelist-configuration branch January 3, 2020 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants