Class WebClientTracing
java.lang.Object
io.helidon.webclient.tracing.WebClientTracing
- All Implemented Interfaces:
NamedService, WebClientService
Client service for tracing propagation.
This service adds appropriate headers to the outbound request to propagate trace across services, so the spans
can form a hierarchy in a tracer, such as Jaeger.
-
Nested Class Summary
Nested classes/interfaces inherited from interface WebClientService
WebClientService.Chain, WebClientService.TransportChain, WebClientService.WireProtocolChainModifier and TypeInterfaceDescriptionstatic interfaceChain of services.static interfaceTerminal service chain that can expose transport response context after an invocation.static interfaceTerminal service chain that exposes the currently selected wire protocol. -
Method Summary
Modifier and TypeMethodDescriptionstatic WebClientServicecreate()Creates new instance of client tracing service.static WebClientServiceCreates a new client tracing service for a specific tracer.handle(WebClientService.Chain chain, WebClientServiceRequest request) Invoke a service, callWebClientService.Chain.proceed(io.helidon.webclient.api.WebClientServiceRequest)to call the next service in the chain.type()Type of this implementation, to distinguish instances of same type, with differentNamedService.name().Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface WebClientService
nameModifier and TypeMethodDescriptiondefault Stringname()Name of this implementation, as provided inConfiguredProvider.create(Config, String).
-
Method Details
-
create
Creates new instance of client tracing service.- Returns:
- client tracing service
-
create
Creates a new client tracing service for a specific tracer.- Parameters:
tracer- to create new spans- Returns:
- client tracing service
-
type
Description copied from interface:NamedServiceType of this implementation, to distinguish instances of same type, with differentNamedService.name(). Use for exampleConfiguredProvider.configKey()to define the type.- Specified by:
typein interfaceNamedService- Specified by:
typein interfaceWebClientService- Returns:
- type of this service
-
handle
public WebClientServiceResponse handle(WebClientService.Chain chain, WebClientServiceRequest request) Description copied from interface:WebClientServiceInvoke a service, callWebClientService.Chain.proceed(io.helidon.webclient.api.WebClientServiceRequest)to call the next service in the chain.- Specified by:
handlein interfaceWebClientService- Parameters:
chain- to invoke next web client service, or the HTTP call if this is the last servicerequest- request from the client, or previous services- Returns:
- response to be returned to the client
-