Skip to content

Commit

Permalink
Remove http status text
Browse files Browse the repository at this point in the history
  • Loading branch information
cpackingham committed Sep 22, 2020
1 parent 038f505 commit 35fb22c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -52,7 +52,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

- Remove the B3 propagator from `go.opentelemetry.io/otel/propagators`. It is now located in the
`go.opentelemetry.io/contrib/propagators/` module. (#1191)

- Remove semantic convention for HTTP status text.
### Fixed

- Zipkin example no longer mentions `ParentSampler`, corrected to `ParentBased`. (#1171)
Expand Down
4 changes: 0 additions & 4 deletions semconv/http.go
Expand Up @@ -224,10 +224,6 @@ func HTTPAttributesFromHTTPStatusCode(code int) []label.KeyValue {
attrs := []label.KeyValue{
HTTPStatusCodeKey.Int(code),
}
text := http.StatusText(code)
if text != "" {
attrs = append(attrs, HTTPStatusTextKey.String(text))
}
return attrs
}

Expand Down
1 change: 0 additions & 1 deletion semconv/http_test.go
Expand Up @@ -682,7 +682,6 @@ func TestHTTPServerAttributesFromHTTPRequest(t *testing.T) {
func TestHTTPAttributesFromHTTPStatusCode(t *testing.T) {
expected := []label.KeyValue{
label.Int("http.status_code", 404),
label.String("http.status_text", "Not Found"),
}
got := HTTPAttributesFromHTTPStatusCode(http.StatusNotFound)
assertElementsMatch(t, expected, got, "with valid HTTP status code")
Expand Down
3 changes: 0 additions & 3 deletions semconv/trace.go
Expand Up @@ -94,9 +94,6 @@ const (
// HTTP response status code.
HTTPStatusCodeKey = label.Key("http.status_code")

// HTTP reason phrase.
HTTPStatusTextKey = label.Key("http.status_text")

// Kind of HTTP protocol used.
HTTPFlavorKey = label.Key("http.flavor")

Expand Down

0 comments on commit 35fb22c

Please sign in to comment.