-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Currently, when logging errors around requests not being completed, such as Incomplete Http Call Timeouts, the content length that is logged is always 0.
This is expected behavior based on java docs:
riposte/riposte-spi/src/main/java/com/nike/riposte/server/http/RequestInfo.java
Lines 142 to 149 in 2e57e93
| /** | |
| * Returns the total size of the raw content in bytes. This will be 0 until {@link #addContentChunk(HttpContent)} | |
| * detects that the final content chunk has been added, at which point this method will return the number of bytes | |
| * for the request content. You can call {@link #isCompleteRequestWithAllChunks()} to determine whether this method | |
| * is returning 0 because we're waiting on all the content to finish arriving or because the request has no content | |
| * associated with it. | |
| */ | |
| public int getRawContentLengthInBytes(); |
and implementation at
riposte/riposte-spi/src/main/java/com/nike/riposte/server/http/impl/RequestInfoImpl.java
Lines 215 to 220 in 2e57e93
| public synchronized int getRawContentLengthInBytes() { | |
| if (!isCompleteRequestWithAllChunks) | |
| return 0; | |
| return rawContentLengthInBytes; | |
| } |
It is coded to return 0 until the request is completed.
Enabling a method to get the current request size in these error scenarios would be helpful and provide insights.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels