Add semantic attributes for HTTP content length. (#1376)

This commit is contained in:
Anuraag Agrawal 2020-06-26 20:56:03 +09:00 committed by GitHub
parent 4008f7d515
commit 35eb6411e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 0 deletions

View File

@ -98,6 +98,30 @@ public final class SemanticAttributes {
/** The IP address of the original client behind all proxies, if known. */
public static final StringAttributeSetter HTTP_CLIENT_IP =
StringAttributeSetter.create("http.client_ip");
/**
* The size of the request payload body, in bytes. For payloads using transport encoding, this is
* the compressed size.
*/
public static final StringAttributeSetter HTTP_REQUEST_CONTENT_LENGTH =
StringAttributeSetter.create("http.request_content_length");
/**
* The size of the uncompressed request payload body, in bytes. Only set for requests that use
* transport encoding.
*/
public static final StringAttributeSetter HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED =
StringAttributeSetter.create("http.request_content_length_uncompressed");
/**
* The size of the response payload body, in bytes. For payloads using transport encoding, this is
* the compressed size.
*/
public static final StringAttributeSetter HTTP_RESPONSE_CONTENT_LENGTH =
StringAttributeSetter.create("http.response_content_length");
/**
* The size of the uncompressed response payload body, in bytes. Only set for responses that use
* transport encoding.
*/
public static final StringAttributeSetter HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED =
StringAttributeSetter.create("http.response_content_length_uncompressed");
/** The service name, must be equal to the $service part in the span name. */
public static final StringAttributeSetter RPC_SERVICE =
StringAttributeSetter.create("rpc.service");