exceptionless / Exceptionless.Net

Exceptionless clients for the .NET platform
https://exceptionless.com
Other
555 stars 142 forks source link

Added request content logging for Exceptionless.WebApi #185

Closed PolitovArtyom closed 6 years ago

PolitovArtyom commented 6 years ago

Adapted solution from Exceptionless.AspNetCore

But really, i don't like it. I think we should add settings for enabling this feature and setting log message max content size. Otherwise, changes may affect users with large requests payload.

CLAassistant commented 6 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


a.politov seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

PolitovArtyom commented 6 years ago

I've researched problems with synchronus invocation of 'httpContent.ReadAsFormDataAsync()' and 'HttpContent' flush afrer first read.
And there are no solutions. Logging request body in ASP.NET WebApi is potentioally dangerous for external code. So i'm going to close this merge request.

For my case i've implemented plugin with request body logging. If you think plugn may be included in Exceptionless.WebApi, i can create new merge request.

niemyjski commented 6 years ago

Can you please post your plugin code in this issue so others can copy it. That sounds good to me. I'm also going to work putting this behind a flag in other implementations. In the mean time I'm going to close this until we get this tied down as I think there may be a bug with the asp.net core implementation as well