Add Span to Sampler method params
Also allows us to actually create a PercentageBasedSampler (I don't think anyone tried it before) without resorting to lazy beans and proxies. Another freature added here is a default percentage sampler if we know that spans need to be exported (zipkin or stream is present). Fixes gh-138
This commit is contained in:
@@ -18,8 +18,6 @@ package sample;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.sleuth.Sampler;
|
||||
import org.springframework.cloud.sleuth.sampler.AlwaysSampler;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
@@ -34,11 +32,6 @@ public class SampleSleuthApplication {
|
||||
|
||||
public static final String CLIENT_NAME = "testApp";
|
||||
|
||||
@Bean
|
||||
public Sampler defaultSampler() {
|
||||
return new AlwaysSampler();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SampleController sampleController() {
|
||||
return new SampleController();
|
||||
|
||||
Reference in New Issue
Block a user