Package io.micrometer.tracing.http
Interface HttpRequest
- All Superinterfaces:
Request
- All Known Subinterfaces:
HttpClientRequest
,HttpServerRequest
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 TypeMethodDescriptionReturns a header.method()
Returns an HTTP method.path()
Returns an HTTP path.default String
remoteIp()
Returns a remote IP.default int
Returns a remote port.default String
route()
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
Returns an HTTP path.- Returns:
- an HTTP path or
null
if not set.
-
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
Returns an HTTP URL.- Returns:
- an HTTP URL or
null
if not set.
-
header
Returns a header.- Parameters:
name
- header name- Returns:
- an HTTP header or
null
if not set.
-
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.
-