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

How to use
forTransport
method
in
zipkin2.collector.CollectorMetrics

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

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

@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-scribe

@Override
public Builder metrics(CollectorMetrics metrics) {
 if (metrics == null) throw new NullPointerException("metrics == null");
 this.metrics = metrics.forTransport("scribe");
 delegate.metrics(this.metrics);
 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-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-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.java/zipkin-server

/** Configuration for how to buffer spans into messages for Zipkin */
@Bean
Reporter<Span> reporter(
  Sender sender,
  @Value("${zipkin.self-tracing.message-timeout:1}") int messageTimeout,
  CollectorMetrics metrics) {
 return AsyncReporter.builder(sender)
   .messageTimeout(messageTimeout, TimeUnit.SECONDS)
   .metrics(new ReporterMetricsAdapter(metrics.forTransport("local")))
   .build();
}
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);
    }
   };
}
zipkin2.collectorCollectorMetricsforTransport

Javadoc

Those who wish to partition metrics by transport can call this method to include the transport type in the backend metric key.

For example, an implementation may by default report #incrementSpans(int) to the key "zipkin.collector.span.accepted". When metrics.forTransport("kafka"is called, the counter would report to "zipkin.collector.kafka.span.accepted"

Popular methods of CollectorMetrics

  • 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.
  • 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

  • Making http post requests using okhttp
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getSystemService (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JTable (javax.swing)
  • 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