-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
[plugin-rest-api] Add extended logging for HTTP requests and responses #4537
[plugin-rest-api] Add extended logging for HTTP requests and responses #4537
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4537 +/- ##
============================================
+ Coverage 97.31% 97.40% +0.08%
- Complexity 6439 6513 +74
============================================
Files 894 912 +18
Lines 18570 18740 +170
Branches 1238 1249 +11
============================================
+ Hits 18072 18253 +181
+ Misses 389 381 -8
+ Partials 109 106 -3 ☔ View full report in Codecov by Sentry. |
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Outdated
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Outdated
Show resolved
Hide resolved
ae1d87c
to
1b31dc8
Compare
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Outdated
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Outdated
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Outdated
Show resolved
Hide resolved
fa009d6
to
b00fe66
Compare
vividus-plugin-rest-api/src/main/resources/properties/defaults/default.properties
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/java/org/vividus/http/PublishingAttachmentInterceptor.java
Outdated
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Outdated
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Outdated
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Outdated
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/java/org/vividus/http/MimeTypeUtils.java
Show resolved
Hide resolved
vividus-plugin-rest-api/src/main/resources/vividus-plugin/spring.xml
Outdated
Show resolved
Hide resolved
b00fe66
to
c9a5fe6
Compare
} | ||
else if (entity != null) | ||
{ | ||
int bodySizeInBytes = entity.getContent().available(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getContentLength() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getContentLength
Entities can be created without explicitly specifying length:
https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/BasicHttpEntity.java#L67-L69
So I think it's safer to take the length right from the content
vividus-plugin-rest-api/src/main/java/org/vividus/http/ExtendedHttpLoggingInterceptor.java
Outdated
Show resolved
Hide resolved
c9a5fe6
to
df6fcc1
Compare
Closes #4437