use of com.amazonaws.xray.strategy.sampling.LocalizedSamplingStrategy in project aws-xray-sdk-java by aws.
the class AWSXRayServletFilterTest method getMockRecorder.
private AWSXRayRecorder getMockRecorder() {
Emitter blankEmitter = mock(Emitter.class);
LocalizedSamplingStrategy defaultSamplingStrategy = new LocalizedSamplingStrategy();
Mockito.doReturn(true).when(blankEmitter).sendSegment(Mockito.anyObject());
Mockito.doReturn(true).when(blankEmitter).sendSubsegment(Mockito.anyObject());
return AWSXRayRecorderBuilder.standard().withEmitter(blankEmitter).withSamplingStrategy(defaultSamplingStrategy).build();
}
use of com.amazonaws.xray.strategy.sampling.LocalizedSamplingStrategy in project aws-xray-sdk-java by aws.
the class DefaultStreamingStrategyTest method setupAWSXRay.
@Before
public void setupAWSXRay() {
Emitter blankEmitter = Mockito.mock(Emitter.class);
LocalizedSamplingStrategy defaultSamplingStrategy = new LocalizedSamplingStrategy();
Mockito.doReturn(true).when(blankEmitter).sendSegment(Mockito.anyObject());
Mockito.doReturn(true).when(blankEmitter).sendSubsegment(Mockito.anyObject());
AWSXRay.setGlobalRecorder(AWSXRayRecorderBuilder.standard().withEmitter(blankEmitter).withSamplingStrategy(defaultSamplingStrategy).build());
AWSXRay.clearTraceEntity();
}
use of com.amazonaws.xray.strategy.sampling.LocalizedSamplingStrategy in project aws-xray-sdk-java by aws.
the class EntityTest method setupAWSXRay.
@Before
public void setupAWSXRay() {
Emitter blankEmitter = Mockito.mock(Emitter.class);
LocalizedSamplingStrategy defaultSamplingStrategy = new LocalizedSamplingStrategy();
Mockito.doReturn(true).when(blankEmitter).sendSegment(Mockito.anyObject());
Mockito.doReturn(true).when(blankEmitter).sendSubsegment(Mockito.anyObject());
AWSXRay.setGlobalRecorder(AWSXRayRecorderBuilder.standard().withEmitter(blankEmitter).withSamplingStrategy(defaultSamplingStrategy).build());
AWSXRay.clearTraceEntity();
}
use of com.amazonaws.xray.strategy.sampling.LocalizedSamplingStrategy in project aws-xray-sdk-java by aws.
the class ConcurrencyTest method setupAWSXRay.
@BeforeEach
void setupAWSXRay() {
Emitter blankEmitter = Mockito.mock(Emitter.class);
LocalizedSamplingStrategy defaultSamplingStrategy = new LocalizedSamplingStrategy();
Mockito.doReturn(true).when(blankEmitter).sendSegment(Mockito.anyObject());
Mockito.doReturn(true).when(blankEmitter).sendSubsegment(Mockito.anyObject());
AWSXRay.setGlobalRecorder(AWSXRayRecorderBuilder.standard().withEmitter(blankEmitter).withSamplingStrategy(defaultSamplingStrategy).build());
AWSXRay.clearTraceEntity();
}
use of com.amazonaws.xray.strategy.sampling.LocalizedSamplingStrategy in project aws-xray-sdk-java by aws.
the class AWSXRayRecorderTest method setupAWSXRay.
@Before
public void setupAWSXRay() {
MockitoAnnotations.initMocks(this);
Emitter blankEmitter = Mockito.mock(Emitter.class);
LocalizedSamplingStrategy defaultSamplingStrategy = new LocalizedSamplingStrategy();
Mockito.doReturn(true).when(blankEmitter).sendSegment(Mockito.anyObject());
Mockito.doReturn(true).when(blankEmitter).sendSubsegment(Mockito.anyObject());
AWSXRay.setGlobalRecorder(AWSXRayRecorderBuilder.standard().withEmitter(blankEmitter).withSamplingStrategy(defaultSamplingStrategy).build());
AWSXRay.clearTraceEntity();
}
Aggregations