Enum Class BuiltInProperty
- All Implemented Interfaces:
Serializable
,Comparable<BuiltInProperty>
,java.lang.constant.Constable
A built-in property exported by
RequestContextExporter
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription"authenticated.user"
- the authenticated user if exists."client.ip"
- the IP address who initiated a request."elapsed_nanos"
- the amount of time in nanoseconds taken to handle the request."local.host"
- the host name part of the local socket address."local.ip"
- the IP address part of the local socket address."local.port"
- the port number part of the local socket address."remote.host"
- the host name part of the remote socket address."remote.ip"
- the IP address part of the remote socket address."remote.port"
- the port number part of the remote socket address."req.authority"
- the authority of the request, represented as"<hostname>[:<port>]"
."req.cause"
- the cause of the request failure represented byThrowable.printStackTrace()
."req.content"
- the content of the request."req.content_length"
- the byte-length of the request content."req.direction"
- the direction of the request, which is"INBOUND"
for servers and"OUTBOUND"
for clients."req.id"
- the ID of the request."req.method"
- the method name of the request, such as"GET"
and"POST"
."req.name"
- the human-readable name of the request, such as: gRPC - A capitalized method name defined inio.grpc.MethodDescriptor
(e.g,GetItems
) Thrift and annotated service - a method name (e.g,getItems
)HttpService
- an HTTP method name This property is often used as a meter tag or distributed trace's span name."req.path"
- the path of the request."req.query"
- the query of the request."req.root_id"
- the ID of the root service request."req.service_name"
- the human-readable name of the service that served the request, such as: gRPC - a service name (e.g,com.foo.GrpcService
) Thrift - a service type (e.g,com.foo.ThriftService$AsyncIface
orcom.foo.ThriftService$Iface
)HttpService
and annotated service - an innermost class name This property is often used as a meter tag or distributed trace's span name."res.cause"
- the cause of the response failure represented byThrowable.printStackTrace()
."res.content"
- the content of the response."res.content_length"
- the byte-length of the response content."res.status_code"
- the protocol-specific integer representation of the response status code."tls.cipher"
- the current TLS cipher suite."tls.proto"
- the current TLS protocol."tls.session_id"
- the hexadecimal representation of the current TLS session ID. -
Method Summary
Modifier and TypeMethodDescriptionstatic BuiltInProperty
Returns the enum constant of this class with the specified name.static BuiltInProperty[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTHENTICATED_USER
"authenticated.user"
- the authenticated user if exists. -
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_ROOT_ID
-
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:- gRPC - A capitalized method name defined in
io.grpc.MethodDescriptor
(e.g,GetItems
) - Thrift and annotated service - a method name (e.g,
getItems
) HttpService
- an HTTP method name
- gRPC - A capitalized method name defined in
-
REQ_SERVICE_NAME
"req.service_name"
- the human-readable name of the service that served the request, such as:- gRPC - a service name (e.g,
com.foo.GrpcService
) - Thrift - a service type (e.g,
com.foo.ThriftService$AsyncIface
orcom.foo.ThriftService$Iface
) HttpService
and annotated service - an innermost class name
- gRPC - a service name (e.g,
-
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:the content of the request 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. -
REQ_CAUSE
"req.cause"
- the cause of the request failure represented byThrowable.printStackTrace()
. Unavailable if the request has been completed successfully. -
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 response. The content may have one of the following:the content of the response 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. -
RES_CAUSE
"res.cause"
- the cause of the response failure represented byThrowable.printStackTrace()
. Unavailable if the response has been completed successfully. -
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 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 class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-