Interface HttpServerHandler
-
public interface HttpServerHandler
This API is taken from OpenZipkin Brave. This standardizes a way to instrument http servers, particularly in a way that encourages use of portable customizations viaHttpRequestParser
andHttpResponseParser
.- Since:
- 3.0.0
- Author:
- OpenZipkin Brave Authors, Marcin Grzejszczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Span
handleReceive(HttpServerRequest request)
Conditionally joins a span, or starts a new trace, depending on if a trace context was extracted from the request.void
handleSend(HttpServerResponse response, Span span)
Finishes the server span after assigning it tags according to the response or error.
-
-
-
Method Detail
-
handleReceive
Span handleReceive(HttpServerRequest request)
Conditionally joins a span, or starts a new trace, depending on if a trace context was extracted from the request. Tags are added before the span is started.- Parameters:
request
- HTTP request- Returns:
- server side span (either joined or a new trace)
-
handleSend
void handleSend(HttpServerResponse response, Span span)
Finishes the server span after assigning it tags according to the response or error.- Parameters:
response
- HTTP responsespan
- server side span to end
-
-