From 360f7ed18776a5f3d3e7a521ff8ecb7333005dd9 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 14 Nov 2017 11:32:16 +0100 Subject: [PATCH] Removed type target from New/ContinueSpan; fixes #772 --- .../springframework/cloud/sleuth/annotation/ContinueSpan.java | 2 +- .../org/springframework/cloud/sleuth/annotation/NewSpan.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/ContinueSpan.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/ContinueSpan.java index b013ffa65..48b3e69d9 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/ContinueSpan.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/ContinueSpan.java @@ -31,7 +31,7 @@ import java.lang.annotation.Target; */ @Retention(RetentionPolicy.RUNTIME) @Inherited -@Target(value = { ElementType.METHOD, ElementType.TYPE }) +@Target(value = { ElementType.METHOD }) public @interface ContinueSpan { /** diff --git a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/NewSpan.java b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/NewSpan.java index fa97deaeb..c01cc67ad 100644 --- a/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/NewSpan.java +++ b/spring-cloud-sleuth-core/src/main/java/org/springframework/cloud/sleuth/annotation/NewSpan.java @@ -24,7 +24,7 @@ import java.lang.annotation.Target; import org.springframework.core.annotation.AliasFor; /** - * Allows to create a new span around a public method or a class. The new span + * Allows to create a new span around a public method. The new span * will be either a child of an existing span if a trace is already in progress * or a new span will be created if there was no previous trace. *

@@ -38,7 +38,7 @@ import org.springframework.core.annotation.AliasFor; */ @Retention(RetentionPolicy.RUNTIME) @Inherited -@Target(value = { ElementType.METHOD, ElementType.TYPE }) +@Target(value = { ElementType.METHOD }) public @interface NewSpan { /**