Class DistributedTracingInterceptor
java.lang.Object
com.helixframework.okhttp.tracing.DistributedTracingInterceptor
- All Implemented Interfaces:
okhttp3.Interceptor
OkHttp interceptor that adds distributed tracing data to downstream requests.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for creating new instances ofDistributedTracingInterceptor.Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion -
Field Summary
Fields inherited from interface okhttp3.Interceptor
Companion -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Gets the builder forDistributedTracingInterceptor.okhttp3.Responseintercept(okhttp3.Interceptor.Chain chain) 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
@NotNull public okhttp3.Response intercept(@NotNull okhttp3.Interceptor.Chain chain) throws IOException - Specified by:
interceptin interfaceokhttp3.Interceptor- Throws:
IOException
-