Class DistributedTracingInterceptor
java.lang.Object
com.helixframework.resttemplate.tracing.DistributedTracingInterceptor
- All Implemented Interfaces:
org.springframework.http.client.ClientHttpRequestInterceptor
public class DistributedTracingInterceptor
extends Object
implements org.springframework.http.client.ClientHttpRequestInterceptor
RestTemplate interceptor that adds distributed tracing data to downstream requests.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for creating new instances ofDistributedTracingInterceptor. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Gets the builder forDistributedTracingInterceptor.org.springframework.http.client.ClientHttpResponseintercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) Builds aDistributedTracingInterceptorinstance pre-configured to work with Datadog.Builds aDistributedTracingInterceptorinstance pre-configured to work with any Zipkin compatible tracing system.
-
Method Details
-
builder
Gets the builder forDistributedTracingInterceptor.- Returns:
- a
DistributedTracingInterceptor.Builder
-
newDatadogInterceptor
Builds aDistributedTracingInterceptorinstance pre-configured to work with Datadog.- Returns:
- an interceptor pre-configured to work with datadog
-
newZipkinTracingInterceptor
Builds aDistributedTracingInterceptorinstance pre-configured to work with any Zipkin compatible tracing system.- Returns:
- an interceptor pre-configured to work with zipkin
-
intercept
public org.springframework.http.client.ClientHttpResponse intercept(org.springframework.http.HttpRequest request, byte[] body, org.springframework.http.client.ClientHttpRequestExecution execution) throws IOException - Specified by:
interceptin interfaceorg.springframework.http.client.ClientHttpRequestInterceptor- Throws:
IOException
-