Class InMemoryCollectorMetrics

    • Constructor Detail

      • InMemoryCollectorMetrics

        public InMemoryCollectorMetrics()
    • Method Detail

      • forTransport

        public InMemoryCollectorMetrics forTransport​(java.lang.String transportType)
        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". When metrics.forTransport("kafka" is called, the counter would report to "zipkin.collector.kafka.span.accepted"

        Specified by:
        forTransport in interface CollectorMetrics
        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 interface CollectorMetrics
      • 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 interface CollectorMetrics
      • 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 interface CollectorMetrics
      • 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 interface CollectorMetrics
      • 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 interface CollectorMetrics
      • spansDropped

        public int spansDropped()
      • clear

        public void clear()