Package brave
Class Request
java.lang.Object
brave.Request
public abstract class Request extends Object
Abstract request type used for parsing and sampling. When implemented, it will be the parameter
of
SamplerFunction
or TraceContext.Extractor
.
No extensions outside Brave
While this is an abstract type, it should not be subclassed outside the Brave repository. In other words, subtypes are sealed within this source tree.- Since:
- 5.9
- See Also:
SamplerFunction
,TraceContext.Extractor
,TraceContext.Injector
,Response
-
Constructor Summary
Constructors Modifier Constructor Description protected
Request()
-
Method Summary
-
Constructor Details
-
Request
protected Request()
-
-
Method Details
-
spanKind
The remoteSpan.Kind
describing the direction and type of the request. -
unwrap
Returns the underlying request object ornull
if there is none. Here are some request objects:org.apache.http.HttpRequest
,org.apache.dubbo.rpc.Invocation
,org.apache.kafka.clients.consumer.ConsumerRecord
.Note: Some implementations are composed of multiple types, such as a request and a socket address of the client. Moreover, an implementation may change the type returned due to refactoring. Unless you control the implementation, cast carefully (ex using
instanceof
) instead of presuming a specific type will always be returned.- Since:
- 5.9
-
toString
-