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 0beb49456245..dd08cbe493ff 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-httpclientrequestbodysize">the * request size and + * href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpclientresponsebodysize"> * 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.size") + .histogramBuilder("http.client.request.body.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.size") + .histogramBuilder("http.client.response.body.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 d6bf144385d5..7c91292f513e 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-httpserverrequestbodysize">the * request size and the + * href="https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md#metric-httpserverresponsebodysize">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.size") + .histogramBuilder("http.server.request.body.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.size") + .histogramBuilder("http.server.response.body.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 9d8748ab61c4..b15b58f71df7 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.size") + .hasName("http.client.request.body.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.size") + .hasName("http.client.response.body.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.size") + .hasName("http.client.request.body.size") .hasHistogramSatisfying( histogram -> histogram.hasPointsSatisfying(point -> point.hasSum(200 /* bytes */))), metric -> assertThat(metric) - .hasName("http.client.response.size") + .hasName("http.client.response.body.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 95cc458ab13a..13796304b236 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.size") + .hasName("http.server.request.body.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.size") + .hasName("http.server.response.body.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.size") + .hasName("http.server.request.body.size") .hasHistogramSatisfying( histogram -> histogram.hasPointsSatisfying( @@ -230,7 +230,7 @@ void collectsMetrics() { .hasSpanId(spanContext2.getSpanId())))), metric -> assertThat(metric) - .hasName("http.server.response.size") + .hasName("http.server.response.body.size") .hasHistogramSatisfying( histogram -> histogram.hasPointsSatisfying(