Package zipkin2.reporter
Interface ReporterMetrics
-
- All Known Implementing Classes:
InMemoryReporterMetrics
public interface ReporterMetrics
Instrumented applications report spans over a transport such as Kafka to Zipkin Collectors.Callbacks on this type are invoked by zipkin reporters to improve the visibility of the system. A typical implementation will report metrics to a telemetry system for analysis and reporting.
Spans Reported vs Queryable Spans
A span in the context of reporting is <= span in the context of query. Instrumentation should report a span only once except, but certain types of spans cross the network. For example, RPC spans are reported at the client and the server separately.
Key Relationships
The following relationships can be used to consider health of the tracing system.
Pending spans
. Alert when this increases over time as it could lead to dropped spans.- Dropped spans = Alert when this increases as it could indicate a queue backup.
- Successful Messages =
Accepted messages
-Dropped messages
. Alert when this is more than amount of messages received from collectors.
-
-
Field Summary
Fields Modifier and Type Field Description static ReporterMetrics
NOOP_METRICS
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.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.
-
-
-
Field Detail
-
NOOP_METRICS
static final ReporterMetrics NOOP_METRICS
-
-
Method Detail
-
incrementMessages
void incrementMessages()
Increments count of message attempts, which contain 1 or more spans. Ex POST requests or Kafka messages sent.
-
incrementMessagesDropped
void incrementMessagesDropped(Throwable cause)
Increments count of messages that could not be sent. Ex host unavailable, or peer disconnect.
-
incrementSpans
void incrementSpans(int quantity)
Increments the count of spans reported. WhenAsyncReporter
is used, reported spans will usually be a larger number than messages.
-
incrementSpanBytes
void incrementSpanBytes(int quantity)
Increments the number of encoded span bytes reported.
-
incrementMessageBytes
void incrementMessageBytes(int quantity)
Increments the number of bytes containing encoded spans in a message.This is a function of span bytes per message and overhead
-
incrementSpansDropped
void incrementSpansDropped(int quantity)
Increments the count of spans dropped for any reason. For example, failure queueing or sending.
-
updateQueuedSpans
void updateQueuedSpans(int update)
Updates the count of spans pending, following a flush activity.
-
updateQueuedBytes
void updateQueuedBytes(int update)
Updates the count of encoded span bytes pending, following a flush activity.
-
-