Polish
This commit is contained in:
@@ -20,7 +20,6 @@ package org.springframework.cloud.sleuth;
|
||||
* Span reporter that does nothing
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class NoOpSpanReporter implements SpanReporter {
|
||||
|
||||
@@ -22,7 +22,6 @@ package org.springframework.cloud.sleuth;
|
||||
* </a>OpenTracing</a>
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public interface SpanExtractor<T> {
|
||||
|
||||
@@ -22,7 +22,6 @@ package org.springframework.cloud.sleuth;
|
||||
* </a>OpenTracing</a>
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public interface SpanInjector<T> {
|
||||
|
||||
@@ -20,7 +20,6 @@ package org.springframework.cloud.sleuth;
|
||||
* Contract for reporting Sleuth spans for collection. For example to Zipkin.
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public interface SpanReporter {
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.springframework.cloud.sleuth.Tracer;
|
||||
* the span is not closed - it gets {@link Tracer#detach(Span) detached}.
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class TraceContinuingCallable<V> extends TraceCallable<V> implements Callable<V> {
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.netflix.hystrix.HystrixCommand;
|
||||
* @author Tomasz Nurkiewicz, 4financeIT
|
||||
* @author Marcin Grzejszczak, 4financeIT
|
||||
* @author Spencer Gibb
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public abstract class TraceCommand<R> extends HystrixCommand<R> {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.springframework.messaging.Message;
|
||||
* Creates a {@link SpanBuilder} from {@link Message}
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class MessagingSpanExtractor implements SpanExtractor<Message<?>> {
|
||||
|
||||
@@ -33,8 +33,6 @@ import org.springframework.util.StringUtils;
|
||||
* Creates a {@link Span.SpanBuilder} from {@link Message}
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class MessagingSpanInjector implements SpanInjector<MessageBuilder<?>> {
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.springframework.messaging.support.MessageBuilder;
|
||||
* by Messaging and WebSockets
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
|
||||
@@ -36,9 +36,9 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
*
|
||||
* @author Michal Chmielarz, 4financeIT
|
||||
* @author Spencer Gibb
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @see TraceSchedulingAspect
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
@EnableAspectJAutoProxy
|
||||
|
||||
@@ -56,12 +56,11 @@ import static org.springframework.util.StringUtils.hasText;
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Spencer Gibb
|
||||
* @author Dave Syer
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @see Tracer
|
||||
* @see TraceKeys
|
||||
* @see TraceWebAutoConfiguration#traceFilter
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE + 5)
|
||||
public class TraceFilter extends OncePerRequestFilter {
|
||||
|
||||
@@ -54,7 +54,6 @@ import org.springframework.web.context.request.async.WebAsyncTask;
|
||||
* @author Michal Chmielarz, 4financeIT
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @see org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@@ -50,7 +50,6 @@ import org.springframework.util.StringUtils;
|
||||
* @author Michal Chmielarz, 4financeIT
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
|
||||
@@ -37,7 +37,6 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class TraceAsyncClientHttpRequestFactoryWrapper extends AbstractTraceHttpRequestInterceptor
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.springframework.http.client.ClientHttpResponse;
|
||||
* {@link TraceRestTemplateInterceptor#finish() closes the span}
|
||||
*
|
||||
* @author Dave Syer
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class TraceHttpResponse implements ClientHttpResponse {
|
||||
|
||||
@@ -31,10 +31,9 @@ import org.springframework.http.client.ClientHttpResponse;
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Spencer Gibb
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @see org.springframework.web.client.RestTemplate
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class TraceRestTemplateInterceptor extends AbstractTraceHttpRequestInterceptor
|
||||
implements ClientHttpRequestInterceptor {
|
||||
|
||||
@@ -37,7 +37,6 @@ import org.springframework.web.client.AsyncRestTemplate;
|
||||
* {@link AsyncRestTemplate}
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
|
||||
@@ -42,7 +42,6 @@ import org.springframework.web.client.RestTemplate;
|
||||
* enables span information propagation when using {@link RestTemplate}
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
|
||||
@@ -54,7 +54,6 @@ import feign.codec.Decoder;
|
||||
* Auto-configuration} enables span information propagation when using Feign.
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.netflix.zuul.ZuulFilter;
|
||||
* A post request {@link ZuulFilter} that publishes an event upon start of the filtering
|
||||
*
|
||||
* @author Dave Syer
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class TracePostZuulFilter extends ZuulFilter {
|
||||
|
||||
@@ -28,7 +28,6 @@ import com.netflix.zuul.context.RequestContext;
|
||||
* from the current span. We're doing so to ensure tracing propagates to the next hop.
|
||||
*
|
||||
* @author Dave Syer
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class TracePreZuulFilter extends ZuulFilter {
|
||||
|
||||
@@ -37,7 +37,6 @@ import com.netflix.niws.client.http.RestClient;
|
||||
* Propagates traces downstream via http headers that contain trace metadata.
|
||||
*
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class TraceRestClientRibbonCommandFactory extends RestClientRibbonCommandFactory {
|
||||
|
||||
@@ -39,7 +39,6 @@ import com.netflix.zuul.context.RequestContext;
|
||||
* enables span information propagation when using Zuul.
|
||||
*
|
||||
* @author Dave Syer
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.springframework.cloud.sleuth.Span;
|
||||
* Logger of Spans that does nothing
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class NoOpSpanLogger implements SpanLogger {
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.springframework.context.annotation.Configuration;
|
||||
* Note: this is only available for Slf4j
|
||||
*
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
|
||||
@@ -27,7 +27,6 @@ import org.springframework.cloud.sleuth.Span;
|
||||
* started / stopped / continued.
|
||||
*
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class Slf4jSpanLogger implements SpanLogger {
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.springframework.cloud.sleuth.Span;
|
||||
* Contract for implementations responsible for logging Spans
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public interface SpanLogger {
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.springframework.boot.actuate.metrics.CounterService;
|
||||
* Operates on a {@link CounterService} underneath
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class CounterServiceBasedSpanMetricReporter implements SpanMetricReporter {
|
||||
|
||||
@@ -4,7 +4,6 @@ package org.springframework.cloud.sleuth.metric;
|
||||
* {@link SpanMetricReporter} that does nothing
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class NoOpSpanMetricReporter implements SpanMetricReporter {
|
||||
|
||||
@@ -6,7 +6,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
* Configuration properties for Sleuth related metrics
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@ConfigurationProperties("spring.sleuth.metric")
|
||||
|
||||
@@ -4,7 +4,6 @@ package org.springframework.cloud.sleuth.metric;
|
||||
* Contract for a service that measures the number of accepted / dropped spans.
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public interface SpanMetricReporter {
|
||||
|
||||
@@ -31,7 +31,6 @@ import org.springframework.context.annotation.Configuration;
|
||||
* enables Sleuth related metrics reporting
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
|
||||
@@ -23,7 +23,6 @@ import org.springframework.cloud.sleuth.Span;
|
||||
* {@link Sampler} that traces each action
|
||||
*
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class AlwaysSampler implements Sampler {
|
||||
|
||||
@@ -24,7 +24,6 @@ import org.springframework.cloud.sleuth.SpanAccessor;
|
||||
* {@link Sampler} that traces only if there is already some tracing going on.
|
||||
*
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
* @see SpanAccessor#isTracing()
|
||||
|
||||
@@ -23,7 +23,6 @@ import org.springframework.cloud.sleuth.Span;
|
||||
* {@link Sampler} that never traces
|
||||
*
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class NeverSampler implements Sampler {
|
||||
|
||||
@@ -21,7 +21,6 @@ import org.springframework.cloud.sleuth.Span;
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Adrian Cole
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class PercentageBasedSampler implements Sampler {
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
*
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Adrian Cole
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@ConfigurationProperties("spring.sleuth.sampler")
|
||||
|
||||
@@ -33,7 +33,6 @@ import org.springframework.cloud.sleuth.util.ExceptionUtils;
|
||||
* Default implementation of {@link Tracer}
|
||||
*
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public class DefaultTracer implements Tracer {
|
||||
|
||||
@@ -25,8 +25,6 @@ import org.springframework.core.NamedThreadLocal;
|
||||
*
|
||||
* @author Spencer Gibb
|
||||
* @author Dave Syer
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class SpanContextHolder {
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.apache.commons.logging.Log;
|
||||
* when there are some issues with tracing.
|
||||
*
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public final class ExceptionUtils {
|
||||
|
||||
Reference in New Issue
Block a user