Interface ClientAttributesGetter<REQUEST>

All Known Subinterfaces:
HttpServerAttributesGetter<REQUEST,RESPONSE>

public interface ClientAttributesGetter<REQUEST>
An interface for getting attributes describing a network client.

Instrumentation authors will create implementations of this interface for their specific library/framework. It will be used by the ClientAttributesExtractor (or other convention specific extractors) to obtain the various server attributes in a type-generic way.

Since:
2.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Returns the client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
    default Integer
    Returns the client port number.
  • Method Details

    • getClientAddress

      @Nullable default String getClientAddress(REQUEST request)
      Returns the client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.

      Examples: client.example.com, 10.1.2.80, /tmp/my.sock

    • getClientPort

      @Nullable default Integer getClientPort(REQUEST request)
      Returns the client port number.

      Examples: 65123