Package brave.http
Interface HttpRequestParser
- All Known Implementing Classes:
HttpRequestParser.Default
public interface HttpRequestParser
Use this to control the request data recorded for an
sampled
HTTP client or server span.
Here's an example that changes the span name and records the HTTP url instead of the path.
httpTracing = httpTracing.toBuilder()
.clientRequestParser((request, context, span) -> {
span.name(spanName(adapter, request)); // default span name
span.tag("http.url", request.url()); // the whole url, not just the path
}).build();
- See Also:
HttpResponseParser
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classHttpRequestParser.DefaultThe default data policy sets the span name to the HTTP method and adds the "http.method" and "http.path" tags. -
Field Summary
Fields Modifier and Type Field Description static HttpRequestParserDEFAULT -
Method Summary
Modifier and Type Method Description voidparse(HttpRequest request, TraceContext context, SpanCustomizer span)Implement to choose what data from the http request are parsed into the span representing it.
-
Field Details
-
Method Details
-
parse
Implement to choose what data from the http request are parsed into the span representing it.- See Also:
HttpRequestParser.Default
-