Skip to content

Commit bdf65dd

Browse files
committed
Merge branch 'otelhttp-transport-metrics' of github.com:Sovietaced/opentelemetry-go-contrib into otelhttp-transport-metrics
2 parents 233049a + e071c21 commit bdf65dd

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

CHANGELOG.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
2424
- The semantic conventions used by `go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace` are upgraded to v1.20.0. (#4320)
2525
- The semantic conventions used by `go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace/example` are upgraded to v1.20.0. (#4320)
2626
- The semantic conventions used by `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/example` are upgraded to v1.20.0. (#4320)
27-
- The semantic conventions used by `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`are upgraded to v1.20.0. (#4320)
27+
- The semantic conventions used by `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` are upgraded to v1.20.0. (#4320, #4707)
2828
- Updated configuration schema to include `schema_url` for resource definition and `without_type_suffix` and `without_units` for the Prometheus exporter. (#4727)
29-
- Updated server metrics `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` to comply with OpenTelemetry semantic conventions. (#4707)
3029

3130
### Removed
3231

instrumentation/net/http/otelhttp/handler.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,21 @@ func (h *middleware) createMeasures() {
110110
h.requestBytesCounter, err = h.meter.Int64Counter(
111111
ServerRequestSize,
112112
metric.WithUnit("By"),
113-
metric.WithDescription("Measures the size of HTTP request content length (uncompressed)"),
113+
metric.WithDescription("Measures the size of HTTP request messages."),
114114
)
115115
handleErr(err)
116116

117117
h.responseBytesCounter, err = h.meter.Int64Counter(
118118
ServerResponseSize,
119119
metric.WithUnit("By"),
120-
metric.WithDescription("Measures the size of HTTP response content length (uncompressed)"),
120+
metric.WithDescription("Measures the size of HTTP response messages."),
121121
)
122122
handleErr(err)
123123

124124
h.serverLatencyMeasure, err = h.meter.Float64Histogram(
125125
ServerDuration,
126126
metric.WithUnit("ms"),
127-
metric.WithDescription("Measures the duration of HTTP request handling"),
127+
metric.WithDescription("Measures the duration of inbound HTTP requests."),
128128
)
129129
handleErr(err)
130130
}

instrumentation/net/http/otelhttp/test/handler_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func assertScopeMetrics(t *testing.T, sm metricdata.ScopeMetrics, attrs attribut
5151

5252
want := metricdata.Metrics{
5353
Name: "http.server.request.size",
54-
Description: "Measures the size of HTTP request content length (uncompressed)",
54+
Description: "Measures the size of HTTP request messages.",
5555
Unit: "By",
5656
Data: metricdata.Sum[int64]{
5757
DataPoints: []metricdata.DataPoint[int64]{{Attributes: attrs, Value: 0}},
@@ -63,7 +63,7 @@ func assertScopeMetrics(t *testing.T, sm metricdata.ScopeMetrics, attrs attribut
6363

6464
want = metricdata.Metrics{
6565
Name: "http.server.response.size",
66-
Description: "Measures the size of HTTP response content length (uncompressed)",
66+
Description: "Measures the size of HTTP response messages.",
6767
Unit: "By",
6868
Data: metricdata.Sum[int64]{
6969
DataPoints: []metricdata.DataPoint[int64]{{Attributes: attrs, Value: 11}},
@@ -75,7 +75,7 @@ func assertScopeMetrics(t *testing.T, sm metricdata.ScopeMetrics, attrs attribut
7575

7676
want = metricdata.Metrics{
7777
Name: "http.server.duration",
78-
Description: "Measures the duration of HTTP request handling",
78+
Description: "Measures the duration of inbound HTTP requests.",
7979
Unit: "ms",
8080
Data: metricdata.Histogram[float64]{
8181
DataPoints: []metricdata.HistogramDataPoint[float64]{{Attributes: attrs}},

0 commit comments

Comments
 (0)