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
-
Fields inherited from interface brave.http.HttpRequestParser
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
All Methods Instance Methods Concrete Methods 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.
-
-
-
Method Detail
-
parse
public 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.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
@Nullable protected String spanName(HttpRequest req, TraceContext context)
Returns the span name of the request or null if the data needed is unavailable. Defaults to the http method.
-
-