Tabnine Logo
CollectorMetrics.incrementMessagesDropped
Code IndexAdd Tabnine to your IDE (free)

How to use
incrementMessagesDropped
method
in
zipkin2.collector.CollectorMetrics

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

origin: io.zipkin.java/zipkin-server

@Override
public void incrementSpansDropped(int i) {
 delegate.incrementMessagesDropped();
}
origin: io.zipkin.java/zipkin-server

@Override
public void incrementMessagesDropped(Throwable throwable) {
 delegate.incrementMessagesDropped();
}
origin: io.zipkin.java/zipkin-server

 @Override
 public void error(HttpServerExchange exchange, IOException e) {
  ZipkinHttpCollector.this.metrics.incrementMessagesDropped();
  ZipkinHttpCollector.error(exchange, e);
 }
};
origin: io.zipkin.zipkin2/zipkin-collector

RuntimeException errorReading(String message, Throwable e) {
 metrics.incrementMessagesDropped();
 return doError(message, e);
}
origin: io.zipkin.zipkin2/zipkin-collector-scribe

     .collect(Collectors.toList());
} catch (RuntimeException e) {
 metrics.incrementMessagesDropped();
 return Futures.immediateFailedFuture(e);
origin: io.zipkin.zipkin2/zipkin-collector-kafka

 metrics.incrementMessagesDropped();
} else {
   collector.accept(Collections.singletonList(span), NOOP);
  } catch (RuntimeException e) {
   metrics.incrementMessagesDropped();
origin: io.zipkin.java/zipkin-server

 @Override
 public void handle(HttpServerExchange exchange, byte[] body) {
  String encoding = exchange.getRequestHeaders().getFirst(CONTENT_ENCODING);
  if (encoding != null && encoding.contains("gzip")) {
   try {
    body = gunzip(body);
   } catch (IOException e) {
    metrics.incrementMessagesDropped();
    exchange
      .setStatusCode(400)
      .getResponseSender()
      .send("Cannot gunzip spans: " + e.getMessage() + "\n");
    return;
   }
  }
  collector.acceptSpans(
    body,
    decoder,
    new Callback<Void>() {
     @Override
     public void onSuccess(Void value) {
      exchange.setStatusCode(202).getResponseSender().close();
     }
     @Override
     public void onError(Throwable t) {
      error(exchange, t);
     }
    });
 }
}
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-junit

 body = result.readByteArray();
} catch (IOException e) {
 metrics.incrementMessagesDropped();
 return new MockResponse().setResponseCode(400).setBody("Cannot gunzip spans");
zipkin2.collectorCollectorMetricsincrementMessagesDropped

Javadoc

Increments count of messages that could not be read. Ex malformed content, or peer disconnect.

Popular methods of CollectorMetrics

  • forTransport
    Those who wish to partition metrics by transport can call this method to include the transport type
  • incrementMessages
    Increments count of messages received, which contain 0 or more spans. Ex POST requests or Kafka mess
  • 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

  • Finding current android device location
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JCheckBox (javax.swing)
  • 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