Q - the HTTP request entity.P - the HTTP response entity.@ExperimentalApi public abstract class HttpExtractor<Q,P> extends Object
This class provides no-op implementations by default.
Please refer to this document for more information about the HTTP attributes recorded in Open Census.
| Constructor and Description |
|---|
HttpExtractor() |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getHost(Q request)
Returns the request URL host.
|
abstract String |
getMethod(Q request)
Returns the request method.
|
abstract String |
getPath(Q request)
Returns the request URL path.
|
abstract String |
getRoute(Q request)
Returns the request route.
|
abstract int |
getStatusCode(P response)
Returns the response status code.
|
abstract String |
getUrl(Q request)
Returns the request URL.
|
abstract String |
getUserAgent(Q request)
Returns the request user agent.
|
@Nullable public abstract String getRoute(Q request)
request - the HTTP request.@Nullable public abstract String getUrl(Q request)
request - the HTTP request.@Nullable public abstract String getHost(Q request)
request - the HTTP request.@Nullable public abstract String getMethod(Q request)
request - the HTTP request.@Nullable public abstract String getPath(Q request)
request - the HTTP request.@Nullable public abstract String getUserAgent(Q request)
request - the HTTP request.