Skip to content
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

Merged

Conversation

draker94
Copy link
Contributor

@draker94 draker94 commented Nov 6, 2023

Closes #4437

@draker94 draker94 requested a review from a team as a code owner November 6, 2023 15:30
Copy link

codecov bot commented Nov 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ed72cbb) 97.31% compared to head (df6fcc1) 97.40%.
Report is 76 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

@draker94 draker94 force-pushed the add_http_extended_logging branch from ae1d87c to 1b31dc8 Compare November 6, 2023 22:21
@draker94 draker94 force-pushed the add_http_extended_logging branch 3 times, most recently from fa009d6 to b00fe66 Compare November 10, 2023 08:28
@draker94 draker94 force-pushed the add_http_extended_logging branch from b00fe66 to c9a5fe6 Compare November 16, 2023 18:14
@valfirst valfirst requested a review from uarlouski November 27, 2023 16:34
}
else if (entity != null)
{
int bodySizeInBytes = entity.getContent().available();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getContentLength() ?

Copy link
Contributor Author

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

@draker94 draker94 force-pushed the add_http_extended_logging branch from c9a5fe6 to df6fcc1 Compare November 28, 2023 12:51
@valfirst valfirst requested a review from uarlouski November 28, 2023 14:20
@valfirst valfirst merged commit d924404 into vividus-framework:master Nov 29, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request and response details in the execution log
4 participants