congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
CollectorMetrics.incrementMessages
Code IndexAdd Tabnine to your IDE (free)

How to use
incrementMessages
method
in
zipkin2.collector.CollectorMetrics

Best Java code snippets using zipkin2.collector.CollectorMetrics.incrementMessages (Showing top 7 results out of 315)

origin: io.zipkin.java/zipkin-server

@Override
public void incrementMessages() {
 delegate.incrementMessages();
}
origin: io.zipkin.zipkin2/zipkin-collector-scribe

@Override
public ListenableFuture<ResultCode> log(List<LogEntry> messages) {
 metrics.incrementMessages();
 List<Span> spans;
 try {
origin: io.zipkin.zipkin2/zipkin-collector-kafka

LOG.debug("Kafka polling returned batch of {} messages.", consumerRecords.count());
for (ConsumerRecord<byte[], byte[]> record : consumerRecords) {
 metrics.incrementMessages();
 final byte[] bytes = record.value();
origin: io.zipkin.zipkin2/zipkin-collector-rabbitmq

 @Override
 public void handleDelivery(
   String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) {
  metrics.incrementMessages();
  this.collector.acceptSpans(body, NOOP);
 }
}
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.java/zipkin-server

@Override
public void handleRequest(HttpServerExchange exchange) throws Exception {
 boolean v2 = exchange.getRelativePath().equals("/api/v2/spans");
 boolean v1 = !v2 && exchange.getRelativePath().equals("/api/v1/spans");
 if (!v2 && !v1) {
  next.handleRequest(exchange);
  return;
 }
 if (!POST.equals(exchange.getRequestMethod())) {
  next.handleRequest(exchange);
  return;
 }
 String contentTypeValue = exchange.getRequestHeaders().getFirst(CONTENT_TYPE);
 boolean json = contentTypeValue == null || contentTypeValue.startsWith("application/json");
 boolean thrift = !json && contentTypeValue.startsWith("application/x-thrift");
 boolean proto = v2 && !json && contentTypeValue.startsWith("application/x-protobuf");
 if (!json && !thrift && !proto) {
  exchange
    .setStatusCode(400)
    .getResponseSender()
    .send("unsupported content type " + contentTypeValue + "\n");
  return;
 }
 HttpCollector collector = v2 ? (json ? JSON_V2 : PROTO3) : thrift ? THRIFT : JSON_V1;
 metrics.incrementMessages();
 exchange.getRequestReceiver().receiveFullBytes(collector, errorCallback);
}
origin: io.zipkin.zipkin2/zipkin-junit

MockResponse acceptSpans(RecordedRequest request, SpanBytesDecoder decoder) {
 metrics.incrementMessages();
 byte[] body = request.getBody().readByteArray();
 String encoding = request.getHeader("Content-Encoding");
zipkin2.collectorCollectorMetricsincrementMessages

Javadoc

Increments count of messages received, which contain 0 or more spans. Ex POST requests or Kafka messages consumed.

Popular methods of CollectorMetrics

  • forTransport
    Those who wish to partition metrics by transport can call this method to include the transport type
  • incrementMessagesDropped
    Increments count of messages that could not be read. Ex malformed content, or peer disconnect.
  • incrementBytes
    Increments the number of bytes containing serialized spans in a message.Note: this count should rela
  • incrementSpans
    Increments the count of spans read from a successful message. When bundling is used, accepted spans
  • incrementSpansDropped
    Increments the count of spans dropped for any reason. For example, failure queueing to storage or sa

Popular in Java

  • Start an intent from android
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • startActivity (Activity)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JButton (javax.swing)
  • Option (scala)
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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