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

How to use
accept
method
in
zipkin2.collector.Collector

Best Java code snippets using zipkin2.collector.Collector.accept (Showing top 5 results out of 315)

origin: io.zipkin.azure/zipkin-collector-eventhub

@Override
public void onEvents(PartitionContext context, Iterable<EventData> messages)
  throws ExecutionException, InterruptedException {
 // don't issue a write until we checkpoint or exit this callback
 List<Span> buffer = new ArrayList<>();
 for (EventData data : messages) {
  byte[] bytes = data.getBytes();
  BytesDecoder<Span> decoder = decoderForListMessage(bytes);
  List<Span> nextSpans = decoder.decodeList(bytes);
  buffer.addAll(nextSpans);
  if (maybeCheckpoint(context, data, nextSpans.size())) {
   collector.accept(buffer, NOOP);
   buffer.clear();
  }
 }
 if (!buffer.isEmpty()) {
  collector.accept(buffer, NOOP);
 }
}
origin: io.zipkin.zipkin2/zipkin-collector-kafka

try {
 Span span = SpanBytesDecoder.THRIFT.decodeOne(bytes);
 collector.accept(Collections.singletonList(span), NOOP);
} catch (RuntimeException e) {
 metrics.incrementMessagesDropped();
origin: io.zipkin.zipkin2/zipkin-collector-kafka08

@Override
public void run() {
 ConsumerIterator<byte[], byte[]> messages = stream.iterator();
 while (messages.hasNext()) {
  byte[] bytes = messages.next().message();
  metrics.incrementMessages();
  if (bytes.length < 2) { // need two bytes to check if protobuf
   metrics.incrementMessagesDropped();
   continue;
  }
  // If we received legacy single-span encoding, decode it into a singleton list
  if (!protobuf3(bytes) && bytes[0] <= 16 && bytes[0] != 12 /* thrift, but not a list */) {
   try {
    metrics.incrementBytes(bytes.length);
    Span span = SpanBytesDecoder.THRIFT.decodeOne(bytes);
    collector.accept(Collections.singletonList(span), NOOP);
   } catch (RuntimeException e) {
    metrics.incrementMessagesDropped();
   }
  } else {
   collector.acceptSpans(bytes, NOOP);
  }
 }
}
origin: io.zipkin.zipkin2/zipkin-collector-scribe

collector.accept(
  spans,
  new Callback<Void>() {
origin: io.zipkin.zipkin2/zipkin-collector

public void acceptSpans(
  byte[] serializedSpans, BytesDecoder<Span> decoder, Callback<Void> callback) {
 metrics.incrementBytes(serializedSpans.length);
 List<Span> spans;
 try {
  spans = decodeList(decoder, serializedSpans);
 } catch (RuntimeException e) {
  callback.onError(errorReading(e));
  return;
 }
 accept(spans, callback);
}
zipkin2.collectorCollectoraccept

Popular methods of Collector

  • acceptSpans
  • newBuilder
    Needed to scope this to the correct logging category
  • <init>
  • acceptSpansCallback
  • appendSpanIds
  • decodeList
  • doError
  • errorReading
  • errorStoringSpans
    When storing spans, an exception can be raised before or after the fact. This adds context of span i
  • idString
  • record
  • sample
  • record,
  • sample,
  • shouldWarn,
  • warn

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
  • putExtra (Intent)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Notification (javax.management)
  • JLabel (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • From CI to AI: The AI layer in your organization
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