-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
HttpInterface API for providing the request body #273
Comments
We should definitely add it to the (I haven't put much thought into the second question yet.) |
I think for (2) we should do whatever we end up doing for Which ends up being close to the MDC answer except it'll be type safe and hopefully allow this to even be used in async frameworks like Netty (if we do it right). |
A |
This was a bit ugly to implement on the client-side. Here's the steps that I took, so that hopefully customizing the client can be made to feel more natural.
Suggestions:
|
@ben-manes thanks the writeup. I agree with all the suggestions, will try to get time for this. |
Sentry-Java SDK v3has the |
This is related to #223 and the log4j library.
We've implemented our own caching of the request body and want to include it in Sentry events, however the HttpInterface doesn't even have a "data" field. This means we need to copy/paste and re-implemnent the entire stack from
HttpInterface
,HttpInterfaceBinding
, andHttpEventBuilderHelper
,DefaultRavenFactory#createMarshaller(Dsn dsn)
That is an onerous amount of work just to get the request payload to show up in the "BODY" view of the sentry UI.
An easier, but not as nice solution is to add it as the logged message it self, but that requires special handling on all
log.error()
calls.Regarding 2, there are several possibilities. One is a static method on
RavenServletRequestListener
that lets the caller inject the payload. Another is that the "requestBody" (or some such key) on the MDC is special cased.The text was updated successfully, but these errors were encountered: