Enum JavaHttpClientAttributesGetter

java.lang.Object
java.lang.Enum<JavaHttpClientAttributesGetter>
io.opentelemetry.instrumentation.httpclient.internal.JavaHttpClientAttributesGetter
All Implemented Interfaces:
io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>, io.opentelemetry.instrumentation.api.semconv.http.HttpCommonAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>, io.opentelemetry.instrumentation.api.semconv.network.NetworkAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>, io.opentelemetry.instrumentation.api.semconv.network.ServerAttributesGetter<java.net.http.HttpRequest>, Serializable, Comparable<JavaHttpClientAttributesGetter>, java.lang.constant.Constable

public enum JavaHttpClientAttributesGetter extends Enum<JavaHttpClientAttributesGetter> implements io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>
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 JavaHttpClientAttributesGetter[] 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 JavaHttpClientAttributesGetter 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(java.net.http.HttpRequest httpRequest)
      Specified by:
      getHttpRequestMethod in interface io.opentelemetry.instrumentation.api.semconv.http.HttpCommonAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>
    • getUrlFull

      public String getUrlFull(java.net.http.HttpRequest httpRequest)
      Specified by:
      getUrlFull in interface io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>
    • getHttpRequestHeader

      public List<String> getHttpRequestHeader(java.net.http.HttpRequest httpRequest, String name)
      Specified by:
      getHttpRequestHeader in interface io.opentelemetry.instrumentation.api.semconv.http.HttpCommonAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>
    • getHttpResponseStatusCode

      public Integer getHttpResponseStatusCode(java.net.http.HttpRequest httpRequest, java.net.http.HttpResponse<?> httpResponse, @Nullable Throwable error)
      Specified by:
      getHttpResponseStatusCode in interface io.opentelemetry.instrumentation.api.semconv.http.HttpCommonAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>
    • getHttpResponseHeader

      public List<String> getHttpResponseHeader(java.net.http.HttpRequest httpRequest, java.net.http.HttpResponse<?> httpResponse, String name)
      Specified by:
      getHttpResponseHeader in interface io.opentelemetry.instrumentation.api.semconv.http.HttpCommonAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>
    • getNetworkProtocolName

      @Nullable public String getNetworkProtocolName(java.net.http.HttpRequest request, @Nullable java.net.http.HttpResponse<?> response)
      Specified by:
      getNetworkProtocolName in interface io.opentelemetry.instrumentation.api.semconv.network.NetworkAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>
    • getNetworkProtocolVersion

      @Nullable public String getNetworkProtocolVersion(java.net.http.HttpRequest request, @Nullable java.net.http.HttpResponse<?> response)
      Specified by:
      getNetworkProtocolVersion in interface io.opentelemetry.instrumentation.api.semconv.network.NetworkAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>
    • getServerAddress

      @Nullable public String getServerAddress(java.net.http.HttpRequest request)
      Specified by:
      getServerAddress in interface io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>
      Specified by:
      getServerAddress in interface io.opentelemetry.instrumentation.api.semconv.network.ServerAttributesGetter<java.net.http.HttpRequest>
    • getServerPort

      public Integer getServerPort(java.net.http.HttpRequest request)
      Specified by:
      getServerPort in interface io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesGetter<java.net.http.HttpRequest,java.net.http.HttpResponse<?>>
      Specified by:
      getServerPort in interface io.opentelemetry.instrumentation.api.semconv.network.ServerAttributesGetter<java.net.http.HttpRequest>