Skip to content

Commit

Permalink
[collector] fix the wrong condition for checking the response (#2067)
Browse files Browse the repository at this point in the history
Co-authored-by: tomsun28 <tomsun28@outlook.com>
  • Loading branch information
ileonli and tomsun28 authored Jun 15, 2024
1 parent 2fcd100 commit bc4ddef
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void collect(CollectRep.MetricsData.Builder builder,
// Option 1: Parse using InputStream, but this requires significant code changes;
// Option 2: Manually trigger garbage collection, similar to how it's done in Dubbo for large inputs.
String resp = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
if (StringUtils.hasText(resp)) {
if (!StringUtils.hasText(resp)) {
log.info("http response entity is empty, status: {}.", statusCode);
}
Long responseTime = System.currentTimeMillis() - startTime;
Expand Down

0 comments on commit bc4ddef

Please sign in to comment.