From cda1e8f51ef95a1dced07539d67e8e6233dcacc9 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Mon, 1 Jul 2024 16:18:55 +0200 Subject: [PATCH] Revert "Update http metrics to the latest version (#11659)" This reverts commit 9f7aec5365734403cb4108e68a6ba9e0f9a04098. --- .../semconv/http/HttpClientExperimentalMetrics.java | 8 ++++---- .../semconv/http/HttpServerExperimentalMetrics.java | 8 ++++---- .../semconv/http/HttpClientExperimentalMetricsTest.java | 8 ++++---- .../semconv/http/HttpServerExperimentalMetricsTest.java | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpClientExperimentalMetrics.java b/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpClientExperimentalMetrics.java index dd08cbe493ff..0beb49456245 100644 --- a/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpClientExperimentalMetrics.java +++ b/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpClientExperimentalMetrics.java @@ -24,9 +24,9 @@ * {@link OperationListener} which keeps track of non-stable * HTTP client metrics: the + * href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpclientrequestsize">the * request size and + * href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpclientresponsesize"> * the response size. */ public final class HttpClientExperimentalMetrics implements OperationListener { @@ -53,7 +53,7 @@ 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(); @@ -61,7 +61,7 @@ private HttpClientExperimentalMetrics(Meter meter) { 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(); diff --git a/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpServerExperimentalMetrics.java b/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpServerExperimentalMetrics.java index 7c91292f513e..d6bf144385d5 100644 --- a/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpServerExperimentalMetrics.java +++ b/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpServerExperimentalMetrics.java @@ -28,9 +28,9 @@ * HTTP server metrics: the * number of in-flight request, the + * href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverrequestsize">the * request size and the + * href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverresponsesize">the * response size. */ public final class HttpServerExperimentalMetrics implements OperationListener { @@ -65,7 +65,7 @@ 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(); @@ -73,7 +73,7 @@ private HttpServerExperimentalMetrics(Meter meter) { 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(); diff --git a/instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpClientExperimentalMetricsTest.java b/instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpClientExperimentalMetricsTest.java index b15b58f71df7..9d8748ab61c4 100644 --- a/instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpClientExperimentalMetricsTest.java +++ b/instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpClientExperimentalMetricsTest.java @@ -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( @@ -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( @@ -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 */)))); diff --git a/instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpServerExperimentalMetricsTest.java b/instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpServerExperimentalMetricsTest.java index 13796304b236..95cc458ab13a 100644 --- a/instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpServerExperimentalMetricsTest.java +++ b/instrumentation-api-incubator/src/test/java/io/opentelemetry/instrumentation/api/incubator/semconv/http/HttpServerExperimentalMetricsTest.java @@ -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( @@ -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( @@ -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( @@ -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(