Package brave.http
Class HttpRequestParser.Default
java.lang.Object
brave.http.HttpRequestParser.Default
- All Implemented Interfaces:
HttpRequestParser
- Enclosing interface:
- HttpRequestParser
public static class HttpRequestParser.Default extends Object implements HttpRequestParser
The default data policy sets the span name to the HTTP method and adds the "http.method" and
"http.path" tags.
-
Nested Class Summary
Nested classes/interfaces inherited from interface brave.http.HttpRequestParser
HttpRequestParser.Default
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
Modifier and Type Method Description void
parse(HttpRequest req, TraceContext context, SpanCustomizer span)
This sets the span name to the HTTP method and adds the "http.method" and "http.path" tags.protected String
spanName(HttpRequest req, TraceContext context)
Returns the span name of the request or null if the data needed is unavailable.
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
parse
This sets the span name to the HTTP method and adds the "http.method" and "http.path" tags.If you only want to change the span name, subclass and override
spanName(HttpRequest, TraceContext)
.- Specified by:
parse
in interfaceHttpRequestParser
- See Also:
HttpRequestParser.Default
-
spanName
Returns the span name of the request or null if the data needed is unavailable. Defaults to the http method.
-