Package zipkin2.collector
Class InMemoryCollectorMetrics
java.lang.Object
zipkin2.collector.InMemoryCollectorMetrics
- All Implemented Interfaces:
CollectorMetrics
-
Field Summary
Fields inherited from interface zipkin2.collector.CollectorMetrics
NOOP_METRICS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
bytes()
void
clear()
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
Increments count of messages received, which contain 0 or more spans.void
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
int
spans()
int
-
Constructor Details
-
InMemoryCollectorMetrics
public InMemoryCollectorMetrics()
-
-
Method Details
-
forTransport
Description copied from interface:CollectorMetrics
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
incremented spans
to the key "zipkin.collector.span.accepted". Whenmetrics.forTransport("kafka"
is called, the counter would report to "zipkin.collector.kafka.span.accepted"- Specified by:
forTransport
in interfaceCollectorMetrics
- Parameters:
transportType
- ex "http", "rabbitmq", "kafka"
-
incrementMessages
public void incrementMessages()Description copied from interface:CollectorMetrics
Increments count of messages received, which contain 0 or more spans. Ex POST requests or Kafka messages consumed.- Specified by:
incrementMessages
in interfaceCollectorMetrics
-
messages
public int messages() -
incrementMessagesDropped
public void incrementMessagesDropped()Description copied from interface:CollectorMetrics
Increments count of messages that could not be read. Ex malformed content, or peer disconnect.- Specified by:
incrementMessagesDropped
in interfaceCollectorMetrics
-
messagesDropped
public int messagesDropped() -
incrementBytes
public void incrementBytes(int quantity) Description copied from interface:CollectorMetrics
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.
- Specified by:
incrementBytes
in interfaceCollectorMetrics
-
bytes
public int bytes() -
incrementSpans
public void incrementSpans(int quantity) Description copied from interface:CollectorMetrics
Increments the count of spans read from a successful message. When bundling is used, accepted spans will be a larger number than successful messages.- Specified by:
incrementSpans
in interfaceCollectorMetrics
-
spans
public int spans() -
incrementSpansDropped
public void incrementSpansDropped(int quantity) Description copied from interface:CollectorMetrics
Increments the count of spans dropped for any reason. For example, failure queueing to storage or sampling decisions.- Specified by:
incrementSpansDropped
in interfaceCollectorMetrics
-
spansDropped
public int spansDropped() -
clear
public void clear()
-