diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/DefaultSpanNamer.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/DefaultSpanNamer.java index b79bf567d..607a17c97 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/DefaultSpanNamer.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/DefaultSpanNamer.java @@ -23,21 +23,15 @@ import org.springframework.core.annotation.AnnotationUtils; /** * Default implementation of SpanNamer that tries to get the span name as follows: * - *
  • - * - * - * - * - *
  • + * + * * from the toString() of the delegate if it's not the default + * {@link Object#toString()}. + * + * * the default provided value. * * @author Marcin Grzejszczak * @since 1.0.0 diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/SpanTag.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/SpanTag.java index d17858de7..a24da40ce 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/SpanTag.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/SpanTag.java @@ -28,12 +28,9 @@ import org.springframework.core.annotation.AliasFor; * There are 3 different ways to add tags to a span. All of them are controlled by the * annotation values. Precedence is: * - * + * try with the {@link TagValueResolver} bean if the value of the bean wasn't set, try to + * evaluate a SPEL expression if there’s no SPEL expression just return a + * {@code toString()} value of the parameter * * @author Christian Schwerdtfeger * @since 1.2.0 diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/autoconfig/TraceEnvironmentPostProcessor.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/autoconfig/TraceEnvironmentPostProcessor.java index 70c38ef0a..f3a85b857 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/autoconfig/TraceEnvironmentPostProcessor.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/autoconfig/TraceEnvironmentPostProcessor.java @@ -27,10 +27,8 @@ import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertySource; /** - * Adds default properties for the application: - * + * Adds default properties for the application: logging pattern level that prints trace + * information (e.g. trace ids). * * @author Dave Syer * @author Marcin Grzejszczak diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/messaging/TracingChannelInterceptor.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/messaging/TracingChannelInterceptor.java index 6a0330028..009b775f1 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/messaging/TracingChannelInterceptor.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/messaging/TracingChannelInterceptor.java @@ -50,12 +50,10 @@ import org.springframework.util.ClassUtils; * native headers. It also extracts or creates a {@link Span.Kind#CONSUMER} span for each * message received. This span is injected onto each message so it becomes the parent when * a handler later calls {@link MessageHandler#handleMessage(Message)}, or a another - * processing library calls {@link #nextSpan(Message)}. - *

    - *

    - * This implementation uses {@link ThreadLocalSpan} to propagate context between - * callbacks. This is an alternative to {@code ThreadStatePropagationChannelInterceptor} - * which is less sensitive to message manipulation by other interceptors. + * processing library calls {@link #nextSpan(Message)}. This implementation uses + * {@link ThreadLocalSpan} to propagate context between callbacks. This is an alternative + * to {@code ThreadStatePropagationChannelInterceptor} which is less sensitive to message + * manipulation by other interceptors. * * @author Marcin Grzejszczak */ diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/TraceWebAspect.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/TraceWebAspect.java index cec12db30..f3425d745 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/TraceWebAspect.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/TraceWebAspect.java @@ -33,18 +33,18 @@ import org.springframework.web.context.request.async.WebAsyncTask; /** * Aspect that adds tracing to - *

    - *

    - *

    + *

    + *

    + * {@code RestController} annotated classes with public {@link Callable} methods + * {@link org.springframework.stereotype.Controller} annotated classes with public + * {@link Callable} methods {@link org.springframework.stereotype.Controller} or + * {@code RestController} annotated classes with public {@link WebAsyncTask} methods + *

    + *

    * For controllers an around aspect is created that wraps the {@link Callable#call()} * method execution in {@link TraceCallable} - *

    + *

    + *

    * * This aspect will continue a span created by the TracingFilter. It will not create a new * span - since the one in TracingFilter will wait until processing has been finished diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/feign/TraceFeignBlockingLoadBalancerClient.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/feign/TraceFeignBlockingLoadBalancerClient.java index 585a560e4..766ecc74d 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/feign/TraceFeignBlockingLoadBalancerClient.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/instrument/web/client/feign/TraceFeignBlockingLoadBalancerClient.java @@ -32,8 +32,7 @@ import org.springframework.cloud.client.loadbalancer.LoadBalancerClient; import org.springframework.cloud.openfeign.loadbalancer.FeignBlockingLoadBalancerClient; /** - * A trace representation of {@link FeignBlockingLoadBalancerClient}. Needed due to casts - * in {@link org.springframework.cloud.openfeign.FeignClientFactoryBean}. + * A trace representation of {@link FeignBlockingLoadBalancerClient}. * * @author Olga Maciaszek-Sharma * @since 2.2.0 diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/sampler/ProbabilityBasedSampler.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/sampler/ProbabilityBasedSampler.java index 49ba4e9a7..70164cb5d 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/sampler/ProbabilityBasedSampler.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/sampler/ProbabilityBasedSampler.java @@ -26,15 +26,14 @@ import org.springframework.util.Assert; /** * This sampler is appropriate for low-traffic instrumentation (ex servers that each - * receive <100K requests), or those who do not provision random trace ids. It not - * appropriate for collectors as the sampling decision isn't idempotent (consistent based - * on trace id). + * receive less than 100K requests), or those who do not provision random trace ids. It + * not appropriate for collectors as the sampling decision isn't idempotent (consistent + * based on trace id). * *

    Implementation

    * *

    - * Taken from Zipkin project + * Taken from CountingTraceIdSampler class from Zipkin project. *

    * *

    diff --git a/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/DefaultEndpointLocator.java b/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/DefaultEndpointLocator.java index 1ed5f0662..ebeef7c32 100644 --- a/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/DefaultEndpointLocator.java +++ b/spring-cloud-sleuth-zipkin/src/main/java/org/springframework/cloud/sleuth/zipkin2/DefaultEndpointLocator.java @@ -32,13 +32,10 @@ import org.springframework.core.env.Environment; import org.springframework.util.StringUtils; /** - * {@link EndpointLocator} implementation that. - * - *

    + * {@link EndpointLocator} implementation that. serviceName - from + * {@link ServerProperties} or {@link Registration} ip - from + * {@link ServerProperties} port - from lazily assigned port or + * {@link ServerProperties} * * You can override the name using {@link ZipkinProperties.Service#setName(String)} *