Interface HttpRequest

All Superinterfaces:
Request
All Known Subinterfaces:
HttpClientRequest, HttpServerRequest

public interface HttpRequest extends Request
This API is taken from OpenZipkin Brave.

Abstract response type used for parsing and sampling. Represents an HTTP request.

Since:
1.10.0
  • Method Summary

    Modifier and Type
    Method
    Description
    header(String name)
    Returns a header.
    Returns an HTTP method.
    Returns an HTTP path.
    default String
    Returns a remote IP.
    default int
    Returns a remote port.
    default String
    Returns an expression such as "/items/:itemId" representing an application endpoint, conventionally associated with the tag key "http.route".
    url()
    Returns an HTTP URL.

    Methods inherited from interface io.micrometer.tracing.http.Request

    headerNames, kind, unwrap
  • Method Details

    • method

      String method()
      Returns an HTTP method.
      Returns:
      an HTTP method.
    • path

      @Nullable String path()
      Returns an HTTP path.
      Returns:
      an HTTP path or null if not set.
    • route

      @Nullable default String route()
      Returns an expression such as "/items/:itemId" representing an application endpoint, conventionally associated with the tag key "http.route". If no route matched, "" (empty string) is returned. null indicates this instrumentation doesn't understand http routes.
      Returns:
      an HTTP route or null if not set
    • url

      @Nullable String url()
      Returns an HTTP URL.
      Returns:
      an HTTP URL or null if not set.
    • header

      @Nullable String header(String name)
      Returns a header.
      Parameters:
      name - header name
      Returns:
      an HTTP header or null if not set.
    • remoteIp

      default String remoteIp()
      Returns a remote IP.
      Returns:
      remote IP for the given connection.
    • remotePort

      default int remotePort()
      Returns a remote port.
      Returns:
      remote port for the given connection.