Interface HttpCommonAttributesGetter<REQUEST,RESPONSE>

All Known Subinterfaces:
HttpClientAttributesGetter<REQUEST,RESPONSE>, HttpServerAttributesGetter<REQUEST,RESPONSE>

public interface HttpCommonAttributesGetter<REQUEST,RESPONSE>
An interface for getting HTTP attributes common to clients and servers.
  • Method Details

    • getMethod

      @Nullable default String getMethod(REQUEST request)
    • method

      @Deprecated @Nullable default String method(REQUEST request)
      Deprecated.
      Use getMethod(Object) instead.
      This method is deprecated and will be removed in the subsequent release.
    • getRequestHeader

      default List<String> getRequestHeader(REQUEST request, String name)
      Extracts all values of header named name from the request, or an empty list if there were none.

      Implementations of this method must not return a null value; an empty list should be returned instead.

    • requestHeader

      @Deprecated default List<String> requestHeader(REQUEST request, String name)
      Deprecated.
      Extracts all values of header named name from the request, or an empty list if there were none.

      Implementations of this method must not return a null value; an empty list should be returned instead.

      This method is deprecated and will be removed in the subsequent release.

    • getStatusCode

      @Nullable default Integer getStatusCode(REQUEST request, RESPONSE response, @Nullable Throwable error)
      Extracts the http.status_code span attribute.

      This is called from Instrumenter.end(Context, Object, Object, Throwable), only when response is non-null.

    • statusCode

      @Deprecated @Nullable default Integer statusCode(REQUEST request, RESPONSE response, @Nullable Throwable error)
      Extracts the http.status_code span attribute.

      This is called from Instrumenter.end(Context, Object, Object, Throwable), only when response is non-null.

      This method is deprecated and will be removed in the subsequent release.

    • getResponseHeader

      default List<String> getResponseHeader(REQUEST request, RESPONSE response, String name)
      Extracts all values of header named name from the response, or an empty list if there were none.

      This is called from Instrumenter.end(Context, Object, Object, Throwable), only when response is non-null.

      Implementations of this method must not return a null value; an empty list should be returned instead.

    • responseHeader

      @Deprecated default List<String> responseHeader(REQUEST request, RESPONSE response, String name)
      Extracts all values of header named name from the response, or an empty list if there were none.

      This is called from Instrumenter.end(Context, Object, Object, Throwable), only when response is non-null.

      Implementations of this method must not return a null value; an empty list should be returned instead.

      This method is deprecated and will be removed in the subsequent release.