Skip to content

Commit 70c1791

Browse files
committed
Add back removed constants and make note about deprecation
1 parent f41446d commit 70c1791

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1313
- Add the new `go.opentelemetry.io/contrib/instrgen` package to provide auto-generated source code instrumentation. (#3068, #3108)
1414
- Add client metric support to `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`. (#4707)
1515

16-
### Removed
16+
### Deprecated
1717

18-
- Remove `RequestCount`, `RequestContentLength`, `ResponseContentLength`, `ServerLatency` constants from `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp`. (#4707)
18+
- The `RequestCount`, `RequestContentLength`, `ResponseContentLength`, `ServerLatency` constants in `go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp` are deprecated. (#4707)
1919

2020
## [1.22.0/0.47.0/0.16.0/0.2.0] - 2024-01-18
2121

instrumentation/net/http/otelhttp/common.go

+8
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ const (
3131

3232
// Server HTTP metrics.
3333
const (
34+
// Deprecated: This field is unused.
35+
RequestCount = "http.server.request_count" // Incoming request count total
36+
// Deprecated: Use of this field has been migrated to serverRequestSize. It will be removed in a future version.
37+
RequestContentLength = "http.server.request_content_length" // Incoming request bytes total
38+
// Deprecated: Use of this field has been migrated to serverResponseSize. It will be removed in a future version.
39+
ResponseContentLength = "http.server.response_content_length" // Incoming response bytes total
40+
// Deprecated: Use of this field has been migrated to serverDuration. It will be removed in a future version.
41+
ServerLatency = "http.server.duration" // Incoming end to end duration, milliseconds
3442
serverRequestSize = "http.server.request.size" // Incoming request bytes total
3543
serverResponseSize = "http.server.response.size" // Incoming response bytes total
3644
serverDuration = "http.server.duration" // Incoming end to end duration, milliseconds

0 commit comments

Comments
 (0)