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

How to use
incrementBytes
method
in
zipkin2.collector.CollectorMetrics

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

origin: io.zipkin.java/zipkin-server

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

.map(m -> m.message.getBytes(StandardCharsets.ISO_8859_1))
.peek(b -> metrics.incrementBytes(b.length))
.map(SpanBytesDecoder.THRIFT::decodeOne)
.collect(Collectors.toList());
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);
}
origin: io.zipkin.zipkin2/zipkin-collector

public void acceptSpans(byte[] serialized, Callback<Void> callback) {
 BytesDecoder<Span> decoder;
 try {
  decoder = SpanBytesDecoderDetector.decoderForListMessage(serialized);
 } catch (RuntimeException e) {
  metrics.incrementBytes(serialized.length);
  callback.onError(errorReading(e));
  return;
 }
 acceptSpans(serialized, decoder, callback);
}
origin: io.zipkin.zipkin2/zipkin-collector-kafka

metrics.incrementBytes(bytes.length);
try {
 Span span = SpanBytesDecoder.THRIFT.decodeOne(bytes);
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);
  }
 }
}
zipkin2.collectorCollectorMetricsincrementBytes

Javadoc

Increments the number of bytes containing serialized spans in a message.

Note: this count should relate to the raw data structures, like json or thrift, and discount compression, enveloping, etc.

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
  • incrementMessagesDropped
    Increments count of messages that could not be read. Ex malformed content, or peer disconnect.
  • 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

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Permission (java.security)
    Legacy security code; do not use.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 12 Jupyter Notebook extensions
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