| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
| BoundedCharArrayWriter buffer = | ||
| InstrumentationContext.get(MultiMap.class, BoundedCharArrayWriter.class) | ||
| .get(request.headers()); | ||
| if (buffer != null) { |
There was a problem hiding this comment.
Dont we want to check if
(HypertraceConfig.get().getDataCapture().getHttpBody().getRequest().getValue()
&& ContentTypeUtils.shouldCapture(contentType))
Sorry, something went wrong.
There was a problem hiding this comment.
we don't have to check it here bc the buffer is null if the body shouldn't be captured.
Sorry, something went wrong.
| buffer = BoundedBuffersFactory.createWriter(); | ||
| contextStore.put(request.headers(), buffer); | ||
| } | ||
| buffer.write(chunk); |
There was a problem hiding this comment.
Why are we calling this here and in EndRequestAdvice both?
Sorry, something went wrong.
There was a problem hiding this comment.
yes, this writes a chunk and in the end method it as well writes a chunk and sends the request.
Sorry, something went wrong.
| public void handle(Buffer event) { | ||
| String responseBody = event.getString(0, event.length()); | ||
| if (span.isRecording()) { | ||
| span.setAttribute(HypertraceSemanticAttributes.HTTP_RESPONSE_BODY, responseBody); |
There was a problem hiding this comment.
Should we also check if we should capture response body?
Sorry, something went wrong.
There was a problem hiding this comment.
not needed as this is reached only after the check from the previous instrumentation point.
Sorry, something went wrong.
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
| Back | FazBrowse Home | New Git URL |
Resolves #310