Class OkHttpNetAttributesGetter

java.lang.Object
io.opentelemetry.instrumentation.okhttp.v3_0.internal.OkHttpNetAttributesGetter
All Implemented Interfaces:
io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter<okhttp3.Request,okhttp3.Response>

public final class OkHttpNetAttributesGetter extends Object implements io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter<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.
  • Constructor Details

    • OkHttpNetAttributesGetter

      public OkHttpNetAttributesGetter()
  • Method Details

    • getTransport

      public String getTransport(okhttp3.Request request, @Nullable okhttp3.Response response)
      Specified by:
      getTransport in interface io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getProtocolName

      @Nullable public String getProtocolName(okhttp3.Request request, @Nullable okhttp3.Response response)
      Specified by:
      getProtocolName in interface io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getProtocolVersion

      @Nullable public String getProtocolVersion(okhttp3.Request request, @Nullable okhttp3.Response response)
      Specified by:
      getProtocolVersion in interface io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getPeerName

      @Nullable public String getPeerName(okhttp3.Request request)
      Specified by:
      getPeerName in interface io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter<okhttp3.Request,okhttp3.Response>
    • getPeerPort

      public Integer getPeerPort(okhttp3.Request request)
      Specified by:
      getPeerPort in interface io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter<okhttp3.Request,okhttp3.Response>