Package zipkin2.reporter
Class InMemoryReporterMetrics
- java.lang.Object
-
- zipkin2.reporter.InMemoryReporterMetrics
-
- All Implemented Interfaces:
ReporterMetrics
public final class InMemoryReporterMetrics extends Object implements ReporterMetrics
-
-
Field Summary
-
Fields inherited from interface zipkin2.reporter.ReporterMetrics
NOOP_METRICS
-
-
Constructor Summary
Constructors Constructor Description InMemoryReporterMetrics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
void
incrementMessageBytes(int quantity)
Increments the number of bytes containing encoded spans in a message.void
incrementMessages()
Increments count of message attempts, which contain 1 or more spans.void
incrementMessagesDropped(Throwable cause)
Increments count of messages that could not be sent.void
incrementSpanBytes(int quantity)
Increments the number of encoded span bytes reported.void
incrementSpans(int quantity)
Increments the count of spans reported.void
incrementSpansDropped(int quantity)
Increments the count of spans dropped for any reason.long
messageBytes()
long
messages()
long
messagesDropped()
Map<Class<? extends Throwable>,Long>
messagesDroppedByCause()
long
queuedBytes()
long
queuedSpans()
long
spanBytes()
long
spans()
long
spansDropped()
void
updateQueuedBytes(int update)
Updates the count of encoded span bytes pending, following a flush activity.void
updateQueuedSpans(int update)
Updates the count of spans pending, following a flush activity.
-
-
-
Method Detail
-
incrementMessages
public void incrementMessages()
Description copied from interface:ReporterMetrics
Increments count of message attempts, which contain 1 or more spans. Ex POST requests or Kafka messages sent.- Specified by:
incrementMessages
in interfaceReporterMetrics
-
messages
public long messages()
-
incrementMessagesDropped
public void incrementMessagesDropped(Throwable cause)
Description copied from interface:ReporterMetrics
Increments count of messages that could not be sent. Ex host unavailable, or peer disconnect.- Specified by:
incrementMessagesDropped
in interfaceReporterMetrics
-
messagesDropped
public long messagesDropped()
-
incrementMessageBytes
public void incrementMessageBytes(int quantity)
Description copied from interface:ReporterMetrics
Increments the number of bytes containing encoded spans in a message.This is a function of span bytes per message and overhead
- Specified by:
incrementMessageBytes
in interfaceReporterMetrics
- See Also:
Sender.messageSizeInBytes(java.util.List<byte[]>)
-
messageBytes
public long messageBytes()
-
incrementSpans
public void incrementSpans(int quantity)
Description copied from interface:ReporterMetrics
Increments the count of spans reported. WhenAsyncReporter
is used, reported spans will usually be a larger number than messages.- Specified by:
incrementSpans
in interfaceReporterMetrics
-
spans
public long spans()
-
incrementSpanBytes
public void incrementSpanBytes(int quantity)
Description copied from interface:ReporterMetrics
Increments the number of encoded span bytes reported.- Specified by:
incrementSpanBytes
in interfaceReporterMetrics
-
spanBytes
public long spanBytes()
-
incrementSpansDropped
public void incrementSpansDropped(int quantity)
Description copied from interface:ReporterMetrics
Increments the count of spans dropped for any reason. For example, failure queueing or sending.- Specified by:
incrementSpansDropped
in interfaceReporterMetrics
-
spansDropped
public long spansDropped()
-
updateQueuedSpans
public void updateQueuedSpans(int update)
Description copied from interface:ReporterMetrics
Updates the count of spans pending, following a flush activity.- Specified by:
updateQueuedSpans
in interfaceReporterMetrics
-
queuedSpans
public long queuedSpans()
-
updateQueuedBytes
public void updateQueuedBytes(int update)
Description copied from interface:ReporterMetrics
Updates the count of encoded span bytes pending, following a flush activity.- Specified by:
updateQueuedBytes
in interfaceReporterMetrics
-
queuedBytes
public long queuedBytes()
-
clear
public void clear()
-
-