public class Telemetry extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
Telemetry.TelemetryTask |
Modifier and Type | Field and Description |
---|---|
protected AtomicInteger |
bytesDropped |
protected String |
bytesDroppedMetric |
protected AtomicInteger |
bytesSent |
protected String |
bytesSentMetric |
static int |
DEFAULT_FLUSH_INTERVAL |
protected AtomicInteger |
eventsSent |
protected String |
eventsSentMetric |
protected AtomicInteger |
metricsSent |
protected String |
metricsSentMetric |
protected AtomicInteger |
packetsDropped |
protected String |
packetsDroppedMetric |
protected AtomicInteger |
packetsDroppedQueue |
protected String |
packetsDroppedQueueMetric |
protected AtomicInteger |
packetsSent |
protected String |
packetsSentMetric |
StatsDProcessor |
processor |
protected AtomicInteger |
serviceChecksSent |
protected String |
serviceChecksSentMetric |
protected String |
tags |
protected Timer |
timer |
Modifier and Type | Method and Description |
---|---|
void |
flush()
Sends Telemetry metrics to the processor.
|
String |
getTags()
Gets the telemetry tags string.
|
void |
incrBytesDropped(int value) |
void |
incrBytesSent(int value) |
void |
incrEventsSent(int value) |
void |
incrMetricsSent(int value) |
void |
incrPacketDropped(int value) |
void |
incrPacketDroppedQueue(int value) |
void |
incrPacketSent(int value) |
void |
incrServiceChecksSent(int value) |
void |
reset()
Resets all counter in the telemetry (this is useful for tests purposes).
|
void |
start(long flushInterval)
Startsthe flush timer for the telemetry.
|
void |
stop()
Stops the flush timer for the telemetry.
|
public static int DEFAULT_FLUSH_INTERVAL
protected final AtomicInteger metricsSent
protected final AtomicInteger eventsSent
protected final AtomicInteger serviceChecksSent
protected final AtomicInteger bytesSent
protected final AtomicInteger bytesDropped
protected final AtomicInteger packetsSent
protected final AtomicInteger packetsDropped
protected final AtomicInteger packetsDroppedQueue
protected final String metricsSentMetric
protected final String eventsSentMetric
protected final String serviceChecksSentMetric
protected final String bytesSentMetric
protected final String bytesDroppedMetric
protected final String packetsSentMetric
protected final String packetsDroppedMetric
protected final String packetsDroppedQueueMetric
protected String tags
public StatsDProcessor processor
protected Timer timer
public void start(long flushInterval)
flushInterval
- Telemetry flush interval, in milliseconds.public void stop()
public void flush()
public void incrMetricsSent(int value)
public void incrEventsSent(int value)
public void incrServiceChecksSent(int value)
public void incrBytesSent(int value)
public void incrBytesDropped(int value)
public void incrPacketSent(int value)
public void incrPacketDropped(int value)
public void incrPacketDroppedQueue(int value)
public void reset()
public String getTags()
Copyright © 2020. All rights reserved.