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

ASP.NET Core middleware #3

Merged
merged 63 commits into from
Nov 15, 2017
Merged

ASP.NET Core middleware #3

merged 63 commits into from
Nov 15, 2017

Conversation

mausworks
Copy link
Owner

@mausworks mausworks commented Nov 5, 2017

This PR adds a new project named "Pidget.AspNet", along with some test projects. Foremost, it includes an ExceptionReportingMiddleware which captures exceptions thrown by the invocation of the request delegate, appends data captured from the request and then sends it to Sentry using the DSN provided in the ExceptionReportingOptions.

Captured exception are then "silently" re-thrown, meaning a preceding middleware may be used to additionally handle thrown exceptions. It is intentionally written to not obfuscate the original exception thrown; just forward it.

The project also includes the dependency injection extensions ConfigurePidgetMiddleware, which are used to simplify configuration of the exception reporting middleware.

Sentry also strongly suggests sanitizing request data on the client-side so support for this has been added and can be configured through the SanitationOptions property on the ExceptionReportingMiddleware.

TODO:

  • README / documentation.
  • Include headers in event
  • Include cookie in event
  • Include form data in event (currently only "application/x-www-form-urlencoded" is supported)
  • Include JSON body data in event (upcoming feature)
  • Header sanitizing
  • Query string sanitizing
  • Cookie sanitizing
  • Form data sanitizing
  • Deep JSON sanitizing (upcoming feature).

@mausworks mausworks merged commit 31e5d85 into master Nov 15, 2017
@mausworks mausworks deleted the feature/aspnet branch November 15, 2017 00:34
@mausworks mausworks added the enhancement New feature, optimization, tests, etc ... label Nov 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature, optimization, tests, etc ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant