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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Stringmethod(REQUEST request)LongrequestContentLength(REQUEST request, RESPONSE response)Extracts thehttp.request_content_lengthspan attribute.LongrequestContentLengthUncompressed(REQUEST request, RESPONSE response)Extracts thehttp.request_content_length_uncompressedspan attribute.List<String>requestHeader(REQUEST request, String name)Extracts all values of header namednamefrom the request, or an empty list if there were none.LongresponseContentLength(REQUEST request, RESPONSE response)Extracts thehttp.response_content_lengthspan attribute.LongresponseContentLengthUncompressed(REQUEST request, RESPONSE response)Extracts thehttp.response_content_length_uncompressedspan attribute.List<String>responseHeader(REQUEST request, RESPONSE response, String name)Extracts all values of header namednamefrom the response, or an empty list if there were none.IntegerstatusCode(REQUEST request, RESPONSE response)Extracts thehttp.status_codespan attribute.
-
-
-
Method Detail
-
requestHeader
List<String> requestHeader(REQUEST request, String name)
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.
-
requestContentLength
@Nullable Long requestContentLength(REQUEST request, @Nullable RESPONSE response)
Extracts thehttp.request_content_lengthspan attribute.This is called from
Instrumenter.end(Context, Object, Object, Throwable), whetherresponseisnullor not.
-
requestContentLengthUncompressed
@Nullable Long requestContentLengthUncompressed(REQUEST request, @Nullable RESPONSE response)
Extracts thehttp.request_content_length_uncompressedspan attribute.This is called from
Instrumenter.end(Context, Object, Object, Throwable), whetherresponseisnullor not.
-
statusCode
@Nullable Integer statusCode(REQUEST request, RESPONSE response)
Extracts thehttp.status_codespan attribute.This is called from
Instrumenter.end(Context, Object, Object, Throwable), only whenresponseis non-null.
-
responseContentLength
@Nullable Long responseContentLength(REQUEST request, RESPONSE response)
Extracts thehttp.response_content_lengthspan attribute.This is called from
Instrumenter.end(Context, Object, Object, Throwable), only whenresponseis non-null.
-
responseContentLengthUncompressed
@Nullable Long responseContentLengthUncompressed(REQUEST request, RESPONSE response)
Extracts thehttp.response_content_length_uncompressedspan attribute.This is called from
Instrumenter.end(Context, Object, Object, Throwable), only whenresponseis non-null.
-
responseHeader
List<String> responseHeader(REQUEST request, RESPONSE response, String name)
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.
-
-