Enum BuiltInProperty
- All Implemented Interfaces:
Serializable
,Comparable<BuiltInProperty>
,java.lang.constant.Constable
public enum BuiltInProperty extends Enum<BuiltInProperty>
A built-in property exported by
RequestContextExporter
.-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description CLIENT_IP
"client.ip"
- the IP address who initiated a request.ELAPSED_NANOS
"elapsed_nanos"
- the amount of time in nanoseconds taken to handle the request.LOCAL_HOST
"local.host"
- the host name part of the local socket address.LOCAL_IP
"local.ip"
- the IP address part of the local socket address.LOCAL_PORT
"local.port"
- the port number part of the local socket address.REMOTE_HOST
"remote.host"
- the host name part of the remote socket address.REMOTE_IP
"remote.ip"
- the IP address part of the remote socket address.REMOTE_PORT
"remote.port"
- the port number part of the remote socket address.REQ_AUTHORITY
"req.authority"
- the authority of the request, represented as"<hostname>[:<port>]"
.REQ_CONTENT
"req.content"
- the content of the request.REQ_CONTENT_LENGTH
"req.content_length"
- the byte-length of the request content.REQ_DIRECTION
"req.direction"
- the direction of the request, which is"INBOUND"
for servers and"OUTBOUND"
for clients.REQ_ID
"req.id"
- the ID of the request.REQ_METHOD
"req.method"
- the method name of the request, such as"GET"
and"POST"
.REQ_NAME
"req.name"
- the human-readable name of the request, such as RPC method name or annotated service method name.REQ_PATH
"req.path"
- the path of the request.REQ_QUERY
"req.query"
- the query of the request.RES_CONTENT
"res.content"
- the content of the request.RES_CONTENT_LENGTH
"res.content_length"
- the byte-length of the response content.RES_STATUS_CODE
"res.status_code"
- the protocol-specific integer representation of the response status code.SCHEME
TLS_CIPHER
"tls.cipher"
- the current TLS cipher suite.TLS_PROTO
"tls.proto"
- the current SSLSession.getProtocol() TLS protocol}.TLS_SESSION_ID
"tls.session_id"
- the hexadecimal representation of the current TLS session ID. -
Method Summary
Modifier and Type Method Description static BuiltInProperty
valueOf(String name)
Returns the enum constant of this type with the specified name.static BuiltInProperty[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
REMOTE_HOST
"remote.host"
- the host name part of the remote socket address. Unavailable if the connection is not established yet. -
REMOTE_IP
"remote.ip"
- the IP address part of the remote socket address. Unavailable if the connection is not established yet. -
REMOTE_PORT
"remote.port"
- the port number part of the remote socket address. Unavailable if the connection is not established yet. -
LOCAL_HOST
"local.host"
- the host name part of the local socket address. Unavailable if the connection is not established yet. -
LOCAL_IP
"local.ip"
- the IP address part of the local socket address. Unavailable if the connection is not established yet. -
LOCAL_PORT
"local.port"
- the port number part of the local socket address. Unavailable if the connection is not established yet. -
CLIENT_IP
"client.ip"
- the IP address who initiated a request. Unavailable if the connection is not established yet. -
SCHEME
-
ELAPSED_NANOS
"elapsed_nanos"
- the amount of time in nanoseconds taken to handle the request. Unavailable if the request was not handled completely yet. -
REQ_DIRECTION
"req.direction"
- the direction of the request, which is"INBOUND"
for servers and"OUTBOUND"
for clients. -
REQ_AUTHORITY
"req.authority"
- the authority of the request, represented as"<hostname>[:<port>]"
. The port number is omitted when it is same with the default port number of the currentScheme
. -
REQ_ID
"req.id"
- the ID of the request. -
REQ_PATH
"req.path"
- the path of the request. -
REQ_QUERY
"req.query"
- the query of the request. -
REQ_METHOD
"req.method"
- the method name of the request, such as"GET"
and"POST"
. -
REQ_NAME
"req.name"
- the human-readable name of the request, such as RPC method name or annotated service method name. This property is often used as a meter tag or distributed trace's span name. -
REQ_CONTENT_LENGTH
"req.content_length"
- the byte-length of the request content. Unavailable if the current request is not fully received yet. -
REQ_CONTENT
"req.content"
- the content of the request. The content may have one of the following:request type description RPC The RPC parameter list, represented by Arrays.toString(Object...)
for theRpcRequest
. Unavailable if the current request is not an RPC request or is not decoded yet.HTTP The preview content of the Request
. Unavailable if the preview is disabled or not fully produced yet. -
RES_STATUS_CODE
"res.status_code"
- the protocol-specific integer representation of the response status code. Unavailable if the current response is not fully sent yet. -
RES_CONTENT_LENGTH
"res.content_length"
- the byte-length of the response content. Unavailable if the current response is not fully sent yet. -
RES_CONTENT
"res.content"
- the content of the request. The content may have one of the following:response type description RPC The RPC result value of the RpcResponse
. Unavailable if the current response is not fully sent yet.HTTP The preview content of the Response
. Unavailable if the preview is disabled or not fully produced yet. -
TLS_SESSION_ID
"tls.session_id"
- the hexadecimal representation of the current TLS session ID. Unavailable if TLS handshake is not finished or the connection is not a TLS connection. -
TLS_CIPHER
"tls.cipher"
- the current TLS cipher suite. Unavailable if TLS handshake is not finished or the connection is not a TLS connection, such as"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
. -
TLS_PROTO
"tls.proto"
- the current SSLSession.getProtocol() TLS protocol}. Unavailable if TLS handshake is not finished or the connection is not a TLS connection, such as"TLSv1.2"
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-