Package zipkin2.collector
Class InMemoryCollectorMetrics
- java.lang.Object
- 
- zipkin2.collector.InMemoryCollectorMetrics
 
- 
- All Implemented Interfaces:
- CollectorMetrics
 
 public final class InMemoryCollectorMetrics extends Object implements CollectorMetrics 
- 
- 
Field Summary- 
Fields inherited from interface zipkin2.collector.CollectorMetricsNOOP_METRICS
 
- 
 - 
Constructor SummaryConstructors Constructor Description InMemoryCollectorMetrics()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intbytes()voidclear()InMemoryCollectorMetricsforTransport(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- 
forTransportpublic InMemoryCollectorMetrics forTransport(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 interface- CollectorMetrics
- Parameters:
- transportType- ex "http", "rabbitmq", "kafka"
 
 - 
incrementMessagespublic 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 interface- CollectorMetrics
 
 - 
messagespublic int messages() 
 - 
incrementMessagesDroppedpublic void incrementMessagesDropped() Description copied from interface:CollectorMetricsIncrements count of messages that could not be read. Ex malformed content, or peer disconnect.- Specified by:
- incrementMessagesDroppedin interface- CollectorMetrics
 
 - 
messagesDroppedpublic int messagesDropped() 
 - 
incrementBytespublic 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 interface- CollectorMetrics
 
 - 
bytespublic int bytes() 
 - 
incrementSpanspublic 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 interface- CollectorMetrics
 
 - 
spanspublic int spans() 
 - 
incrementSpansDroppedpublic 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 interface- CollectorMetrics
 
 - 
spansDroppedpublic int spansDropped() 
 - 
clearpublic void clear() 
 
- 
 
-