public final class InMemoryCollectorMetrics extends Object implements CollectorMetrics
NOOP_METRICS| Constructor and Description |
|---|
InMemoryCollectorMetrics() |
| Modifier and Type | Method and Description |
|---|---|
int |
bytes() |
void |
clear() |
InMemoryCollectorMetrics |
forTransport(String transportType)
Those who wish to partition metrics by transport can call this method to include the transport
type in the backend metric key.
|
void |
incrementBytes(int quantity)
Increments the number of bytes containing serialized spans in a message.
|
void |
incrementMessages()
Increments count of messages received, which contain 0 or more spans.
|
void |
incrementMessagesDropped()
Increments count of messages that could not be read.
|
void |
incrementSpans(int quantity)
Increments the count of spans read from a successful message.
|
void |
incrementSpansDropped(int quantity)
Increments the count of spans dropped for any reason.
|
int |
messages() |
int |
messagesDropped() |
int |
spans() |
int |
spansDropped() |
public InMemoryCollectorMetrics forTransport(String transportType)
CollectorMetricsFor example, an implementation may by default report incremented
spans to the key "zipkin.collector.span.accepted". When metrics.forTransport("kafka"
is called, the counter would report to "zipkin.collector.kafka.span.accepted"
forTransport in interface CollectorMetricstransportType - ex "http", "rabbitmq", "kafka"public void incrementMessages()
CollectorMetricsincrementMessages in interface CollectorMetricspublic int messages()
public void incrementMessagesDropped()
CollectorMetricsincrementMessagesDropped in interface CollectorMetricspublic int messagesDropped()
public void incrementBytes(int quantity)
CollectorMetricsNote: this count should relate to the raw data structures, like json or thrift, and discount compression, enveloping, etc.
incrementBytes in interface CollectorMetricspublic int bytes()
public void incrementSpans(int quantity)
CollectorMetricsincrementSpans in interface CollectorMetricspublic int spans()
public void incrementSpansDropped(int quantity)
CollectorMetricsincrementSpansDropped in interface CollectorMetricspublic int spansDropped()
public void clear()
Copyright © 2015–2018 OpenZipkin. All rights reserved.