collapse trace and trace.intercept packages
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import static org.springframework.cloud.sleuth.trace.Utils.error;
|
||||
|
||||
import org.springframework.cloud.sleuth.IdGenerator;
|
||||
import static org.springframework.cloud.sleuth.Utils.error;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
/**
|
||||
* Extremely simple callback to determine the frequency that an action should be
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import lombok.extern.apachecommons.CommonsLog;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
/**
|
||||
* The Trace class is the primary way to interact with the library. It provides
|
||||
@@ -1,9 +1,7 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.cloud.sleuth.IdGenerator;
|
||||
import org.springframework.cloud.sleuth.RandomUuidGenerator;
|
||||
import org.springframework.cloud.sleuth.trace.sampler.IsTracingSampler;
|
||||
import org.springframework.cloud.sleuth.sampler.IsTracingSampler;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import lombok.extern.apachecommons.CommonsLog;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.springframework.cloud.sleuth.trace.intercept.circuitbreaker;
|
||||
package org.springframework.cloud.sleuth.circuitbreaker;
|
||||
|
||||
import com.netflix.hystrix.HystrixCommand;
|
||||
import com.netflix.hystrix.HystrixCommandGroupKey;
|
||||
import com.netflix.hystrix.HystrixThreadPoolKey;
|
||||
import org.springframework.cloud.sleuth.trace.Trace;
|
||||
import org.springframework.cloud.sleuth.trace.TraceScope;
|
||||
import org.springframework.cloud.sleuth.Trace;
|
||||
import org.springframework.cloud.sleuth.TraceScope;
|
||||
|
||||
/**
|
||||
* Abstraction over {@code HystrixCommand} that wraps command execution with Trace setting
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.springframework.cloud.sleuth.trace.receiver;
|
||||
package org.springframework.cloud.sleuth.receiver;
|
||||
|
||||
import org.springframework.cloud.sleuth.trace.Span;
|
||||
import org.springframework.cloud.sleuth.trace.SpanReceiver;
|
||||
import org.springframework.cloud.sleuth.Span;
|
||||
import org.springframework.cloud.sleuth.SpanReceiver;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.springframework.cloud.sleuth.trace.sampler;
|
||||
package org.springframework.cloud.sleuth.sampler;
|
||||
|
||||
import org.springframework.cloud.sleuth.trace.Sampler;
|
||||
import org.springframework.cloud.sleuth.Sampler;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
@@ -1,7 +1,7 @@
|
||||
package org.springframework.cloud.sleuth.trace.sampler;
|
||||
package org.springframework.cloud.sleuth.sampler;
|
||||
|
||||
import org.springframework.cloud.sleuth.trace.Sampler;
|
||||
import org.springframework.cloud.sleuth.trace.SpanHolder;
|
||||
import org.springframework.cloud.sleuth.Sampler;
|
||||
import org.springframework.cloud.sleuth.SpanHolder;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.springframework.cloud.sleuth.trace.intercept.scheduling;
|
||||
package org.springframework.cloud.sleuth.scheduling;
|
||||
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.springframework.cloud.sleuth.trace.Trace;
|
||||
import org.springframework.cloud.sleuth.trace.TraceScope;
|
||||
import org.springframework.cloud.sleuth.Trace;
|
||||
import org.springframework.cloud.sleuth.TraceScope;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
|
||||
/**
|
||||
@@ -16,7 +16,7 @@ import org.springframework.scheduling.annotation.Scheduled;
|
||||
* @author Marcin Grzejszczak, 4financeIT
|
||||
* @author Spencer Gibb
|
||||
*
|
||||
* @see org.springframework.cloud.sleuth.trace.Trace
|
||||
* @see Trace
|
||||
*/
|
||||
@Aspect
|
||||
public class TraceSchedulingAspect {
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.springframework.cloud.sleuth.trace.intercept.scheduling;
|
||||
package org.springframework.cloud.sleuth.scheduling;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
*/
|
||||
|
||||
import org.springframework.cloud.sleuth.trace.Trace;
|
||||
import org.springframework.cloud.sleuth.Trace;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.springframework.cloud.sleuth.slf4j;
|
||||
|
||||
import static org.springframework.cloud.sleuth.trace.Trace.SPAN_ID_NAME;
|
||||
import static org.springframework.cloud.sleuth.Trace.SPAN_ID_NAME;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.cloud.sleuth.trace.Span;
|
||||
import org.springframework.cloud.sleuth.trace.SpanReceiver;
|
||||
import org.springframework.cloud.sleuth.Span;
|
||||
import org.springframework.cloud.sleuth.SpanReceiver;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -3,9 +3,9 @@ package org.springframework.cloud.sleuth.slf4j;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.cloud.sleuth.trace.Span;
|
||||
import org.springframework.cloud.sleuth.trace.SpanStartListener;
|
||||
import org.springframework.cloud.sleuth.trace.Trace;
|
||||
import org.springframework.cloud.sleuth.Span;
|
||||
import org.springframework.cloud.sleuth.SpanStartListener;
|
||||
import org.springframework.cloud.sleuth.Trace;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.cloud.sleuth.trace.intercept.web;
|
||||
package org.springframework.cloud.sleuth.web;
|
||||
|
||||
import static org.springframework.cloud.sleuth.trace.Trace.SPAN_ID_NAME;
|
||||
import static org.springframework.cloud.sleuth.Trace.SPAN_ID_NAME;
|
||||
import static org.springframework.util.StringUtils.hasText;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -31,10 +31,10 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.cloud.sleuth.trace.MilliSpan;
|
||||
import org.springframework.cloud.sleuth.trace.Span;
|
||||
import org.springframework.cloud.sleuth.trace.Trace;
|
||||
import org.springframework.cloud.sleuth.trace.TraceScope;
|
||||
import org.springframework.cloud.sleuth.MilliSpan;
|
||||
import org.springframework.cloud.sleuth.Span;
|
||||
import org.springframework.cloud.sleuth.Trace;
|
||||
import org.springframework.cloud.sleuth.TraceScope;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
|
||||
/**
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.springframework.cloud.sleuth.trace.intercept.web;
|
||||
package org.springframework.cloud.sleuth.web;
|
||||
|
||||
import static org.springframework.cloud.sleuth.trace.Trace.SPAN_ID_NAME;
|
||||
import static org.springframework.cloud.sleuth.Trace.SPAN_ID_NAME;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -10,8 +10,8 @@ import lombok.extern.apachecommons.CommonsLog;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.cloud.sleuth.trace.Trace;
|
||||
import org.springframework.cloud.sleuth.trace.TraceScope;
|
||||
import org.springframework.cloud.sleuth.Trace;
|
||||
import org.springframework.cloud.sleuth.TraceScope;
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.stereotype.Controller;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.cloud.sleuth.trace.intercept.web;
|
||||
package org.springframework.cloud.sleuth.web;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
|
||||
import org.springframework.boot.context.embedded.FilterRegistrationBean;
|
||||
import org.springframework.cloud.sleuth.trace.Trace;
|
||||
import org.springframework.cloud.sleuth.Trace;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -13,14 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.cloud.sleuth.trace.intercept.web.client;
|
||||
package org.springframework.cloud.sleuth.web.client;
|
||||
|
||||
import static org.springframework.cloud.sleuth.trace.Trace.SPAN_ID_NAME;
|
||||
import static org.springframework.cloud.sleuth.trace.Trace.TRACE_ID_NAME;
|
||||
import static org.springframework.cloud.sleuth.Trace.SPAN_ID_NAME;
|
||||
import static org.springframework.cloud.sleuth.Trace.TRACE_ID_NAME;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.springframework.cloud.sleuth.trace.SpanHolder;
|
||||
import org.springframework.cloud.sleuth.SpanHolder;
|
||||
import org.springframework.cloud.sleuth.Trace;
|
||||
import org.springframework.http.HttpRequest;
|
||||
import org.springframework.http.client.ClientHttpRequestExecution;
|
||||
import org.springframework.http.client.ClientHttpRequestInterceptor;
|
||||
@@ -31,7 +32,7 @@ import org.springframework.http.client.ClientHttpResponse;
|
||||
* request and sets them if one or both of them are missing.
|
||||
*
|
||||
* @see org.springframework.web.client.RestTemplate
|
||||
* @see org.springframework.cloud.sleuth.trace.Trace
|
||||
* @see Trace
|
||||
*
|
||||
* @author Marcin Grzejszczak, 4financeIT
|
||||
* @author Spencer Gibb
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace.intercept.web.client;
|
||||
package org.springframework.cloud.sleuth.web.client;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
@@ -1,7 +1,7 @@
|
||||
# Auto Configuration
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
org.springframework.cloud.sleuth.resttemplate.SleuthRestTemplateAutoConfiguration,\
|
||||
org.springframework.cloud.sleuth.trace.TraceAutoConfiguration,\
|
||||
org.springframework.cloud.sleuth.trace.intercept.web.TraceWebAutoConfiguration,\
|
||||
org.springframework.cloud.sleuth.trace.intercept.web.client.TraceWebClientAutoConfiguration,\
|
||||
org.springframework.cloud.sleuth.TraceAutoConfiguration,\
|
||||
org.springframework.cloud.sleuth.web.TraceWebAutoConfiguration,\
|
||||
org.springframework.cloud.sleuth.web.client.TraceWebClientAutoConfiguration,\
|
||||
org.springframework.cloud.sleuth.slf4j.SleuthSlf4jAutoConfiguration
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.sleuth.trace;
|
||||
package org.springframework.cloud.sleuth;
|
||||
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
@@ -11,10 +11,9 @@ import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.cloud.sleuth.RandomUuidGenerator;
|
||||
import org.springframework.cloud.sleuth.trace.receiver.ArrayListSpanReceiver;
|
||||
import org.springframework.cloud.sleuth.trace.sampler.AlwaysSampler;
|
||||
import org.springframework.cloud.sleuth.trace.sampler.IsTracingSampler;
|
||||
import org.springframework.cloud.sleuth.receiver.ArrayListSpanReceiver;
|
||||
import org.springframework.cloud.sleuth.sampler.AlwaysSampler;
|
||||
import org.springframework.cloud.sleuth.sampler.IsTracingSampler;
|
||||
|
||||
/**
|
||||
* @author Spencer Gibb
|
||||
@@ -9,9 +9,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.context.embedded.EmbeddedServletContainerInitializedEvent;
|
||||
import org.springframework.cloud.sleuth.trace.Trace;
|
||||
import org.springframework.cloud.sleuth.trace.TraceScope;
|
||||
import org.springframework.cloud.sleuth.trace.sampler.AlwaysSampler;
|
||||
import org.springframework.cloud.sleuth.Trace;
|
||||
import org.springframework.cloud.sleuth.TraceScope;
|
||||
import org.springframework.cloud.sleuth.sampler.AlwaysSampler;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
Reference in New Issue
Block a user