zipkin2.storage.InMemoryStorage Java Examples

The following examples show how to use zipkin2.storage.InMemoryStorage. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ITSQSCollector.java    From zipkin-aws with Apache License 2.0 6 votes vote down vote up
@Before
public void setup() {
  store = InMemoryStorage.newBuilder().build();
  metrics = new InMemoryCollectorMetrics();

  collector =
      new SQSCollector.Builder()
          .queueUrl(sqsRule.queueUrl())
          .parallelism(2)
          .waitTimeSeconds(1) // using short wait time to make test teardown faster
          .endpointConfiguration(new EndpointConfiguration(sqsRule.queueUrl(), "us-east-1"))
          .credentialsProvider(
              new AWSStaticCredentialsProvider(new BasicAWSCredentials("x", "x")))
          .metrics(metrics)
          .sampler(CollectorSampler.ALWAYS_SAMPLE)
          .storage(store)
          .build()
          .start();
  metrics = metrics.forTransport("sqs");
}
 
Example #2
Source File: ZipkinServerConfiguration.java    From pivotal-bank-demo with Apache License 2.0 5 votes vote down vote up
@Bean
StorageComponent storage(
    @Value("${zipkin.storage.strict-trace-id:true}") boolean strictTraceId,
    @Value("${zipkin.storage.search-enabled:true}") boolean searchEnabled,
    @Value("${zipkin.storage.mem.max-spans:500000}") int maxSpans) {
  return InMemoryStorage.newBuilder()
      .strictTraceId(strictTraceId)
      .searchEnabled(searchEnabled)
      .maxSpanCount(maxSpans)
      .build();
}
 
Example #3
Source File: KinesisSpanProcessorTest.java    From zipkin-aws with Apache License 2.0 5 votes vote down vote up
@Before
public void setup() {
  storage = InMemoryStorage.newBuilder().build();
  collector = Collector.newBuilder(KinesisSpanProcessorTest.class)
      .storage(storage)
      .metrics(metrics)
      .build();

  kinesisSpanProcessor = new KinesisSpanProcessor(collector, metrics);
}
 
Example #4
Source File: ITZipkinSelfTracing.java    From pivotal-bank-demo with Apache License 2.0 4 votes vote down vote up
@Before
public void clear() {
  ((InMemoryStorage) storageComponent.delegate).clear();
}
 
Example #5
Source File: ZipkinSQSCollectorModuleTest.java    From zipkin-aws with Apache License 2.0 4 votes vote down vote up
@Bean
StorageComponent storage() {
  return InMemoryStorage.newBuilder().build();
}
 
Example #6
Source File: ZipkinKinesisCollectorModuleTest.java    From zipkin-aws with Apache License 2.0 4 votes vote down vote up
@Bean
StorageComponent storage() {
  return InMemoryStorage.newBuilder().build();
}