congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Collector$Builder
Code IndexAdd Tabnine to your IDE (free)

How to use
Collector$Builder
in
zipkin2.collector

Best Java code snippets using zipkin2.collector.Collector$Builder (Showing top 20 results out of 315)

origin: io.zipkin.zipkin2/zipkin-collector-rabbitmq

Connection compute() {
 Connection connection;
 try {
  connection =
    (builder.addresses == null)
      ? builder.connectionFactory.newConnection()
      : builder.connectionFactory.newConnection(builder.addresses);
  declareQueueIfMissing(connection);
 } catch (IOException | TimeoutException e) {
  throw new IllegalStateException("Unable to establish connection to RabbitMQ server", e);
 }
 Collector collector = builder.delegate.build();
 CollectorMetrics metrics = builder.metrics;
 for (int i = 0; i < builder.concurrency; i++) {
  String name = RabbitMQSpanConsumer.class.getName() + i;
  try {
   // this sets up a channel for each consumer thread.
   // We don't track channels, as the connection will close its channels implicitly
   Channel channel = connection.createChannel();
   RabbitMQSpanConsumer consumer = new RabbitMQSpanConsumer(channel, collector, metrics);
   channel.basicConsume(builder.queue, true, name, consumer);
  } catch (IOException e) {
   throw new IllegalStateException("Failed to start RabbitMQ consumer " + name, e);
  }
 }
 return connection;
}
origin: io.zipkin.zipkin2/zipkin-collector-rabbitmq

@Override
public Builder metrics(CollectorMetrics metrics) {
 if (metrics == null) throw new NullPointerException("metrics == null");
 this.metrics = metrics.forTransport("rabbitmq");
 this.delegate.metrics(this.metrics);
 return this;
}
origin: io.zipkin.zipkin2/zipkin-junit

ZipkinDispatcher(StorageComponent storage, CollectorMetrics metrics, MockWebServer server) {
 this.consumer = Collector.newBuilder(getClass()).storage(storage).metrics(metrics).build();
 this.metrics = metrics;
 this.server = server;
}
origin: io.zipkin.java/zipkin-server

@Autowired
ZipkinHttpCollector(
  StorageComponent storage, CollectorSampler sampler, CollectorMetrics metrics) {
 this.metrics = metrics.forTransport("http");
 this.collector =
   Collector.newBuilder(getClass())
     .storage(storage)
     .sampler(sampler)
     .metrics(this.metrics)
     .build();
 this.JSON_V2 = new HttpCollector(SpanBytesDecoder.JSON_V2);
 this.PROTO3 = new HttpCollector(SpanBytesDecoder.PROTO3);
 this.JSON_V1 = new HttpCollector(SpanBytesDecoder.JSON_V1);
 this.THRIFT = new HttpCollector(SpanBytesDecoder.THRIFT);
 this.errorCallback =
   new Receiver.ErrorCallback() {
    @Override
    public void error(HttpServerExchange exchange, IOException e) {
     ZipkinHttpCollector.this.metrics.incrementMessagesDropped();
     ZipkinHttpCollector.error(exchange, e);
    }
   };
}
origin: io.zipkin.zipkin2/zipkin-collector-kafka08

LazyStreams(Builder builder, LazyConnector connector) {
 this.streams = builder.streams;
 this.topic = builder.topic;
 this.collector = builder.delegate.build();
 this.metrics = builder.metrics;
 this.connector = connector;
}
origin: io.zipkin.zipkin2/zipkin-collector-kafka

KafkaCollectorWorker(KafkaCollector.Builder builder) {
 properties = builder.properties;
 topics = Arrays.asList(builder.topic.split(","));
 collector = builder.delegate.build();
 metrics = builder.metrics;
}
origin: io.zipkin.zipkin2/zipkin-collector-rabbitmq

@Override
public Builder sampler(CollectorSampler sampler) {
 this.delegate.sampler(sampler);
 return this;
}
origin: io.zipkin.zipkin2/zipkin-collector-kafka

@Override
public Builder metrics(CollectorMetrics metrics) {
 if (metrics == null) throw new NullPointerException("metrics == null");
 this.metrics = metrics.forTransport("kafka");
 delegate.metrics(this.metrics);
 return this;
}
origin: io.zipkin.zipkin2/zipkin-collector-kafka

@Override
public Builder sampler(CollectorSampler sampler) {
 delegate.sampler(sampler);
 return this;
}
origin: io.zipkin.zipkin2/zipkin-collector-kafka08

@Override
public Builder sampler(CollectorSampler sampler) {
 delegate.sampler(sampler);
 return this;
}
origin: io.zipkin.aws/zipkin-collector-kinesis

@Override
public Builder metrics(CollectorMetrics metrics) {
 if (metrics == null) throw new NullPointerException("metrics == null");
 delegate.metrics(metrics.forTransport("kinesis"));
 return this;
}
origin: io.zipkin.zipkin2/zipkin-collector-scribe

ScribeSpanConsumer(ScribeCollector.Builder builder) {
 this.collector = builder.delegate.build();
 this.metrics = builder.metrics;
 this.category = builder.category;
}
origin: io.zipkin.zipkin2/zipkin-collector-kafka08

@Override
public Builder storage(StorageComponent storage) {
 delegate.storage(storage);
 return this;
}
origin: io.zipkin.zipkin2/zipkin-collector-rabbitmq

@Override
public Builder storage(StorageComponent storage) {
 this.delegate.storage(storage);
 return this;
}
origin: io.zipkin.azure/zipkin-collector-eventhub

@Override
public Builder storage(StorageComponent storage) {
 delegate.storage(storage);
 return this;
}
origin: io.zipkin.zipkin2/zipkin-collector-scribe

@Override
public Builder storage(StorageComponent storage) {
 delegate.storage(storage);
 return this;
}
origin: io.zipkin.azure/zipkin-collector-eventhub

 @Override
 public IEventProcessor createEventProcessor(PartitionContext context) throws Exception {
  hosts.putIfAbsent(
    context.getPartitionId(),
    new ZipkinEventProcessor(builder.delegate.build(), builder.checkpointBatchSize));
  return hosts.get(context.getPartitionId());
 }
};
origin: io.zipkin.azure/zipkin-collector-eventhub

@Override
public Builder metrics(CollectorMetrics metrics) {
 delegate.metrics(metrics);
 return this;
}
origin: io.zipkin.zipkin2/zipkin-collector-scribe

@Override
public Builder sampler(CollectorSampler sampler) {
 delegate.sampler(sampler);
 return this;
}
origin: io.zipkin.aws/zipkin-collector-kinesis

@Override
public Builder sampler(CollectorSampler collectorSampler) {
 delegate.sampler(collectorSampler);
 return this;
}
zipkin2.collectorCollector$Builder

Most used methods

  • build
  • metrics
  • storage
  • sampler
  • <init>

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now