1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-09-16 09:26:25 +02:00

Remove semantic convention for http status text (#1194)

* Remove http status text

* Updated changelog

* More descriptive changelog

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
Cole Packingham
2020-09-23 13:52:44 -05:00
committed by GitHub
parent 038f505d12
commit 5dd2962202
4 changed files with 1 additions and 8 deletions

View File

@@ -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
}

View File

@@ -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")

View File

@@ -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")