Package zipkin2.collector
Class InMemoryCollectorMetrics
- java.lang.Object
-
- zipkin2.collector.InMemoryCollectorMetrics
-
- All Implemented Interfaces:
CollectorMetrics
public final class InMemoryCollectorMetrics extends java.lang.Object implements CollectorMetrics
-
-
Field Summary
-
Fields inherited from interface zipkin2.collector.CollectorMetrics
NOOP_METRICS
-
-
Constructor Summary
Constructors Constructor Description InMemoryCollectorMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbytes()voidclear()InMemoryCollectorMetricsforTransport(java.lang.String transportType)Those who wish to partition metrics by transport can call this method to include the transport type in the backend metric key.voidincrementBytes(int quantity)Increments the number of bytes containing serialized spans in a message.voidincrementMessages()Increments count of messages received, which contain 0 or more spans.voidincrementMessagesDropped()Increments count of messages that could not be read.voidincrementSpans(int quantity)Increments the count of spans read from a successful message.voidincrementSpansDropped(int quantity)Increments the count of spans dropped for any reason.intmessages()intmessagesDropped()intspans()intspansDropped()
-
-
-
Method Detail
-
forTransport
public InMemoryCollectorMetrics forTransport(java.lang.String transportType)
Description copied from interface:CollectorMetricsThose 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 spansto the key "zipkin.collector.span.accepted". Whenmetrics.forTransport("kafka"is called, the counter would report to "zipkin.collector.kafka.span.accepted"- Specified by:
forTransportin interfaceCollectorMetrics- Parameters:
transportType- ex "http", "rabbitmq", "kafka"
-
incrementMessages
public void incrementMessages()
Description copied from interface:CollectorMetricsIncrements count of messages received, which contain 0 or more spans. Ex POST requests or Kafka messages consumed.- Specified by:
incrementMessagesin interfaceCollectorMetrics
-
messages
public int messages()
-
incrementMessagesDropped
public void incrementMessagesDropped()
Description copied from interface:CollectorMetricsIncrements count of messages that could not be read. Ex malformed content, or peer disconnect.- Specified by:
incrementMessagesDroppedin interfaceCollectorMetrics
-
messagesDropped
public int messagesDropped()
-
incrementBytes
public void incrementBytes(int quantity)
Description copied from interface:CollectorMetricsIncrements 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:
incrementBytesin interfaceCollectorMetrics
-
bytes
public int bytes()
-
incrementSpans
public void incrementSpans(int quantity)
Description copied from interface:CollectorMetricsIncrements 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:
incrementSpansin interfaceCollectorMetrics
-
spans
public int spans()
-
incrementSpansDropped
public void incrementSpansDropped(int quantity)
Description copied from interface:CollectorMetricsIncrements the count of spans dropped for any reason. For example, failure queueing to storage or sampling decisions.- Specified by:
incrementSpansDroppedin interfaceCollectorMetrics
-
spansDropped
public int spansDropped()
-
clear
public void clear()
-
-