Remove the obsolete HTTP_STATUS_TEXT semantic attribute. (#1679)

This commit is contained in:
John Watson 2020-09-22 10:52:37 -07:00 committed by GitHub
parent e8d24a3aed
commit bd51a606a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -78,8 +78,6 @@ public final class SemanticAttributes {
public static final AttributeKey<String> HTTP_SCHEME = stringKey("http.scheme"); public static final AttributeKey<String> HTTP_SCHEME = stringKey("http.scheme");
/** HTTP response status code. E.g. 200 (integer) If and only if one was received/sent. */ /** HTTP response status code. E.g. 200 (integer) If and only if one was received/sent. */
public static final AttributeKey<Long> HTTP_STATUS_CODE = longKey("http.status_code"); public static final AttributeKey<Long> HTTP_STATUS_CODE = longKey("http.status_code");
/** HTTP reason phrase. E.g. "OK" */
public static final AttributeKey<String> HTTP_STATUS_TEXT = stringKey("http.status_text");
/** Kind of HTTP protocol used: "1.0", "1.1", "2", "SPDY" or "QUIC". */ /** Kind of HTTP protocol used: "1.0", "1.1", "2", "SPDY" or "QUIC". */
public static final AttributeKey<String> HTTP_FLAVOR = stringKey("http.flavor"); public static final AttributeKey<String> HTTP_FLAVOR = stringKey("http.flavor");
/** Value of the HTTP "User-Agent" header sent by the client. */ /** Value of the HTTP "User-Agent" header sent by the client. */

View File

@ -192,12 +192,7 @@ class ZipkinSpanExporterTest {
void generateSpan_AlreadyHasHttpStatusInfo() { void generateSpan_AlreadyHasHttpStatusInfo() {
Attributes attributeMap = Attributes attributeMap =
Attributes.of( Attributes.of(
SemanticAttributes.HTTP_STATUS_CODE, SemanticAttributes.HTTP_STATUS_CODE, 404L, stringKey("error"), "A user provided error");
404L,
SemanticAttributes.HTTP_STATUS_TEXT,
"NOT FOUND",
stringKey("error"),
"A user provided error");
SpanData data = SpanData data =
buildStandardSpan() buildStandardSpan()
.setAttributes(attributeMap) .setAttributes(attributeMap)
@ -211,7 +206,6 @@ class ZipkinSpanExporterTest {
.toBuilder() .toBuilder()
.clearTags() .clearTags()
.putTag(SemanticAttributes.HTTP_STATUS_CODE.getKey(), "404") .putTag(SemanticAttributes.HTTP_STATUS_CODE.getKey(), "404")
.putTag(SemanticAttributes.HTTP_STATUS_TEXT.getKey(), "NOT FOUND")
.putTag("error", "A user provided error") .putTag("error", "A user provided error")
.build()); .build());
} }