Micrometer: Support to get http response size by micrometer

Created on 28 Sep 2018  路  7Comments  路  Source: micrometer-metrics/micrometer

Please add support to get http response size as a metric value

enhancement help wanted spring-boot change

Most helpful comment

Eek, things go wrong when doing stuff in between. What I meant was ...
http.server.[request,response].size for server (webmvc,jersey,webflux) instrumentation
and
http.client.[request,response].size for client (RestTemplate, okhttp?,...) instrumentation

All 7 comments

Thanks. Surprised we didn't think of that earlier. Will do it with a DistributionSummary so you can best understand the distribution of response sizes over time.

Just requires a change to WebMvcMetricsFilter, _et al_ and making the corresponding change in Spring Boot 2 and other web frameworks.

Just out of curiosity, would this include body-only-size or include the headers as well?

@mweirauch I think we should do both body and headers (with a tag?) as much as possible. Also, a separate metric for request and response sizes would be potentially useful.
both?

Sounds good.
Would we be differentiating between server and client side instrumentation? Guess so.
So in analogy to http.server.requests and http.client.requests:
http.server.request.size and http.client.request.size? (Don't pin me on the naming.)

http.server.request.size and http.client.request.size? (Don't pin me on the naming.)

@mweirauch I guess you meant http.server.response.size and http.client.response.size?

Eek, things go wrong when doing stuff in between. What I meant was ...
http.server.[request,response].size for server (webmvc,jersey,webflux) instrumentation
and
http.client.[request,response].size for client (RestTemplate, okhttp?,...) instrumentation

Hi is there any updates (after 2 years)?

Was this page helpful?
0 / 5 - 0 ratings