Enum OkHttpAttributesGetter

java.lang.Object
java.lang.Enum<OkHttpAttributesGetter>
io.opentelemetry.instrumentation.okhttp.v3_0.internal.OkHttpAttributesGetter
All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientAttributesGetter<okhttp3.Request,okhttp3.Response>, io.opentelemetry.instrumentation.api.instrumenter.http.HttpCommonAttributesGetter<okhttp3.Request,okhttp3.Response>, io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter<okhttp3.Request,okhttp3.Response>, io.opentelemetry.instrumentation.api.instrumenter.network.NetworkAttributesGetter<okhttp3.Request,okhttp3.Response>, io.opentelemetry.instrumentation.api.instrumenter.network.ServerAttributesGetter<okhttp3.Request,okhttp3.Response>, Serializable, Comparable<OkHttpAttributesGetter>, java.lang.constant.Constable

public enum OkHttpAttributesGetter extends Enum<OkHttpAttributesGetter> implements io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientAttributesGetter<okhttp3.Request,okhttp3.Response>
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
  • Enum Constant Details

  • Method Details

    • values

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

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

      public String getHttpRequestMethod(okhttp3.Request request)
      Specified by:
      getHttpRequestMethod in interface io.opentelemetry.instrumentation.api.instrumenter.http.HttpCommonAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getUrlFull

      public String getUrlFull(okhttp3.Request request)
      Specified by:
      getUrlFull in interface io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getHttpRequestHeader

      public List<String> getHttpRequestHeader(okhttp3.Request request, String name)
      Specified by:
      getHttpRequestHeader in interface io.opentelemetry.instrumentation.api.instrumenter.http.HttpCommonAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getHttpResponseStatusCode

      public Integer getHttpResponseStatusCode(okhttp3.Request request, okhttp3.Response response, @Nullable Throwable error)
      Specified by:
      getHttpResponseStatusCode in interface io.opentelemetry.instrumentation.api.instrumenter.http.HttpCommonAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getHttpResponseHeader

      public List<String> getHttpResponseHeader(okhttp3.Request request, okhttp3.Response response, String name)
      Specified by:
      getHttpResponseHeader in interface io.opentelemetry.instrumentation.api.instrumenter.http.HttpCommonAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getNetworkProtocolName

      @Nullable public String getNetworkProtocolName(okhttp3.Request request, @Nullable okhttp3.Response response)
      Specified by:
      getNetworkProtocolName in interface io.opentelemetry.instrumentation.api.instrumenter.network.NetworkAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getNetworkProtocolVersion

      @Nullable public String getNetworkProtocolVersion(okhttp3.Request request, @Nullable okhttp3.Response response)
      Specified by:
      getNetworkProtocolVersion in interface io.opentelemetry.instrumentation.api.instrumenter.network.NetworkAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getServerAddress

      @Nullable public String getServerAddress(okhttp3.Request request)
      Specified by:
      getServerAddress in interface io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientAttributesGetter<okhttp3.Request,okhttp3.Response>
      Specified by:
      getServerAddress in interface io.opentelemetry.instrumentation.api.instrumenter.network.ServerAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getServerPort

      public Integer getServerPort(okhttp3.Request request)
      Specified by:
      getServerPort in interface io.opentelemetry.instrumentation.api.instrumenter.http.HttpClientAttributesGetter<okhttp3.Request,okhttp3.Response>
      Specified by:
      getServerPort in interface io.opentelemetry.instrumentation.api.instrumenter.network.ServerAttributesGetter<okhttp3.Request,okhttp3.Response>