Skip to content

Commit

Permalink
Revert "Update http metrics to the latest version (open-telemetry#11659
Browse files Browse the repository at this point in the history
…)"

This reverts commit 9f7aec5.
  • Loading branch information
zeitlinger committed Jul 1, 2024
1 parent 79e4a21 commit cda1e8f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
* {@link OperationListener} which keeps track of <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#http-client">non-stable
* HTTP client metrics</a>: <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpclientrequestbodysize">the
* href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpclientrequestsize">the
* request size </a> and <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpclientresponsebodysize">
* href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpclientresponsesize">
* the response size</a>.
*/
public final class HttpClientExperimentalMetrics implements OperationListener {
Expand All @@ -53,15 +53,15 @@ public static OperationMetrics get() {
private HttpClientExperimentalMetrics(Meter meter) {
LongHistogramBuilder requestSizeBuilder =
meter
.histogramBuilder("http.client.request.body.size")
.histogramBuilder("http.client.request.size")
.setUnit("By")
.setDescription("Size of HTTP client request bodies.")
.ofLongs();
HttpExperimentalMetricsAdvice.applyClientRequestSizeAdvice(requestSizeBuilder);
requestSize = requestSizeBuilder.build();
LongHistogramBuilder responseSizeBuilder =
meter
.histogramBuilder("http.client.response.body.size")
.histogramBuilder("http.client.response.size")
.setUnit("By")
.setDescription("Size of HTTP client response bodies.")
.ofLongs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
* HTTP server metrics</a>: <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserveractive_requests">the
* number of in-flight request</a>, <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverrequestbodysize">the
* href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverrequestsize">the
* request size</a> and <a
* href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverresponsebodysize">the
* href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverresponsesize">the
* response size</a>.
*/
public final class HttpServerExperimentalMetrics implements OperationListener {
Expand Down Expand Up @@ -65,15 +65,15 @@ private HttpServerExperimentalMetrics(Meter meter) {
activeRequests = activeRequestsBuilder.build();
LongHistogramBuilder requestSizeBuilder =
meter
.histogramBuilder("http.server.request.body.size")
.histogramBuilder("http.server.request.size")
.setUnit("By")
.setDescription("Size of HTTP server request bodies.")
.ofLongs();
HttpExperimentalMetricsAdvice.applyServerRequestSizeAdvice(requestSizeBuilder);
requestSize = requestSizeBuilder.build();
LongHistogramBuilder responseSizeBuilder =
meter
.histogramBuilder("http.server.response.body.size")
.histogramBuilder("http.server.response.size")
.setUnit("By")
.setDescription("Size of HTTP server response bodies.")
.ofLongs();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void collectsMetrics() {
.satisfiesExactlyInAnyOrder(
metric ->
assertThat(metric)
.hasName("http.client.request.body.size")
.hasName("http.client.request.size")
.hasUnit("By")
.hasDescription("Size of HTTP client request bodies.")
.hasHistogramSatisfying(
Expand All @@ -109,7 +109,7 @@ void collectsMetrics() {
.hasSpanId("090a0b0c0d0e0f00")))),
metric ->
assertThat(metric)
.hasName("http.client.response.body.size")
.hasName("http.client.response.size")
.hasUnit("By")
.hasDescription("Size of HTTP client response bodies.")
.hasHistogramSatisfying(
Expand Down Expand Up @@ -140,13 +140,13 @@ void collectsMetrics() {
.satisfiesExactlyInAnyOrder(
metric ->
assertThat(metric)
.hasName("http.client.request.body.size")
.hasName("http.client.request.size")
.hasHistogramSatisfying(
histogram ->
histogram.hasPointsSatisfying(point -> point.hasSum(200 /* bytes */))),
metric ->
assertThat(metric)
.hasName("http.client.response.body.size")
.hasName("http.client.response.size")
.hasHistogramSatisfying(
histogram ->
histogram.hasPointsSatisfying(point -> point.hasSum(400 /* bytes */))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void collectsMetrics() {
.hasSpanId(spanContext1.getSpanId())))),
metric ->
assertThat(metric)
.hasName("http.server.request.body.size")
.hasName("http.server.request.size")
.hasUnit("By")
.hasDescription("Size of HTTP server request bodies.")
.hasHistogramSatisfying(
Expand All @@ -172,7 +172,7 @@ void collectsMetrics() {
.hasSpanId(spanContext1.getSpanId())))),
metric ->
assertThat(metric)
.hasName("http.server.response.body.size")
.hasName("http.server.response.size")
.hasUnit("By")
.hasDescription("Size of HTTP server response bodies.")
.hasHistogramSatisfying(
Expand Down Expand Up @@ -216,7 +216,7 @@ void collectsMetrics() {
.hasSpanId(spanContext2.getSpanId())))),
metric ->
assertThat(metric)
.hasName("http.server.request.body.size")
.hasName("http.server.request.size")
.hasHistogramSatisfying(
histogram ->
histogram.hasPointsSatisfying(
Expand All @@ -230,7 +230,7 @@ void collectsMetrics() {
.hasSpanId(spanContext2.getSpanId())))),
metric ->
assertThat(metric)
.hasName("http.server.response.body.size")
.hasName("http.server.response.size")
.hasHistogramSatisfying(
histogram ->
histogram.hasPointsSatisfying(
Expand Down

0 comments on commit cda1e8f

Please sign in to comment.