Enum Class BuiltInProperty

java.lang.Object
java.lang.Enum<BuiltInProperty>
com.linecorp.armeria.common.logging.BuiltInProperty
All Implemented Interfaces:
Serializable, Comparable<BuiltInProperty>, java.lang.constant.Constable

public enum BuiltInProperty extends Enum<BuiltInProperty>
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 Constants
    Enum Constant
    Description
    "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 by Throwable.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 in io.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 or com.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 by Throwable.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.
    "scheme" - the scheme of the request, represented by Scheme.uriText(), such as "tbinary+h2".
    "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 Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • AUTHENTICATED_USER

      public static final BuiltInProperty AUTHENTICATED_USER
      "authenticated.user" - the authenticated user if exists.
    • REMOTE_HOST

      public static final BuiltInProperty REMOTE_HOST
      "remote.host" - the host name part of the remote socket address. Unavailable if the connection is not established yet.
    • REMOTE_IP

      public static final BuiltInProperty REMOTE_IP
      "remote.ip" - the IP address part of the remote socket address. Unavailable if the connection is not established yet.
    • REMOTE_PORT

      public static final BuiltInProperty REMOTE_PORT
      "remote.port" - the port number part of the remote socket address. Unavailable if the connection is not established yet.
    • LOCAL_HOST

      public static final BuiltInProperty LOCAL_HOST
      "local.host" - the host name part of the local socket address. Unavailable if the connection is not established yet.
    • LOCAL_IP

      public static final BuiltInProperty LOCAL_IP
      "local.ip" - the IP address part of the local socket address. Unavailable if the connection is not established yet.
    • LOCAL_PORT

      public static final BuiltInProperty LOCAL_PORT
      "local.port" - the port number part of the local socket address. Unavailable if the connection is not established yet.
    • CLIENT_IP

      public static final BuiltInProperty CLIENT_IP
      "client.ip" - the IP address who initiated a request. Unavailable if the connection is not established yet.
    • SCHEME

      public static final BuiltInProperty SCHEME
      "scheme" - the scheme of the request, represented by Scheme.uriText(), such as "tbinary+h2".
    • ELAPSED_NANOS

      public static final BuiltInProperty 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

      public static final BuiltInProperty REQ_DIRECTION
      "req.direction" - the direction of the request, which is "INBOUND" for servers and "OUTBOUND" for clients.
    • REQ_AUTHORITY

      public static final BuiltInProperty 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 current Scheme.
    • REQ_ID

      public static final BuiltInProperty REQ_ID
      "req.id" - the ID of the request.
    • REQ_ROOT_ID

      public static final BuiltInProperty REQ_ROOT_ID
      "req.root_id" - the ID of the root service request. null if RequestContext.root() returns null.
    • REQ_PATH

      public static final BuiltInProperty REQ_PATH
      "req.path" - the path of the request.
    • REQ_QUERY

      public static final BuiltInProperty REQ_QUERY
      "req.query" - the query of the request.
    • REQ_METHOD

      public static final BuiltInProperty REQ_METHOD
      "req.method" - the method name of the request, such as "GET" and "POST".
    • REQ_NAME

      public static final BuiltInProperty 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
      This property is often used as a meter tag or distributed trace's span name.
    • REQ_SERVICE_NAME

      public static final BuiltInProperty 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 or com.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.
    • REQ_CONTENT_LENGTH

      public static final BuiltInProperty 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

      public static final BuiltInProperty REQ_CONTENT
      "req.content" - the content of the request. The content may have one of the following:
      the content of the request
      request typedescription
      RPC The RPC parameter list, represented by Arrays.toString(Object...) for the RpcRequest. 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

      public static final BuiltInProperty REQ_CAUSE
      "req.cause" - the cause of the request failure represented by Throwable.printStackTrace(). Unavailable if the request has been completed successfully.
    • RES_STATUS_CODE

      public static final BuiltInProperty 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

      public static final BuiltInProperty 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

      public static final BuiltInProperty RES_CONTENT
      "res.content" - the content of the response. The content may have one of the following:
      the content of the response
      response typedescription
      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

      public static final BuiltInProperty RES_CAUSE
      "res.cause" - the cause of the response failure represented by Throwable.printStackTrace(). Unavailable if the response has been completed successfully.
    • TLS_SESSION_ID

      public static final BuiltInProperty 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

      public static final BuiltInProperty 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

      public static final BuiltInProperty 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

      public static BuiltInProperty[] 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

      public static BuiltInProperty valueOf(String name)
      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 name
      NullPointerException - if the argument is null