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 Summary
Modifier and TypeMethodDescriptionrequestHeader(REQUEST request, String name) Extracts all values of header namednamefrom the request, or an empty list if there were none.responseHeader(REQUEST request, RESPONSE response, String name) Extracts all values of header namednamefrom the response, or an empty list if there were none.statusCode(REQUEST request, RESPONSE response, Throwable error) Extracts thehttp.status_codespan attribute.
-
Method Details
-
method
-
requestHeader
Extracts all values of header namednamefrom 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.
-
statusCode
Extracts thehttp.status_codespan attribute.This is called from
Instrumenter.end(Context, Object, Object, Throwable), only whenresponseis non-null. -
responseHeader
Extracts all values of header namednamefrom the response, or an empty list if there were none.This is called from
Instrumenter.end(Context, Object, Object, Throwable), only whenresponseis non-null.Implementations of this method must not return a null value; an empty list should be returned instead.
-