public class Telemetry extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Telemetry.Builder |
protected class |
Telemetry.TelemetryTask |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Sends Telemetry metrics to the processor.
|
String |
getTags()
Gets the telemetry tags string.
|
protected String |
getTelemetryTags(String tags,
Message.Type type) |
void |
incrAggregatedContexts(int value) |
void |
incrAggregatedCountContexts(int value) |
void |
incrAggregatedGaugeContexts(int value) |
void |
incrAggregatedSetContexts(int value) |
void |
incrBytesDropped(int value) |
void |
incrBytesSent(int value) |
void |
incrCountSent(int value) |
void |
incrDistributionSent(int value) |
void |
incrEventsSent(int value) |
void |
incrGaugeSent(int value) |
void |
incrHistogramSent(int value) |
void |
incrMetricsSent(int value)
Increase Metrics Sent telemetry metric.
|
void |
incrMetricsSent(int value,
Message.Type type)
Increase Metrics Sent telemetry metric, and specific metric type counter.
|
void |
incrPacketDropped(int value) |
void |
incrPacketDroppedQueue(int value) |
void |
incrPacketSent(int value) |
void |
incrServiceChecksSent(int value) |
void |
incrSetSent(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 gaugeSent
protected final AtomicInteger countSent
protected final AtomicInteger histogramSent
protected final AtomicInteger distributionSent
protected final AtomicInteger setSent
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 AtomicInteger aggregatedContexts
protected final AtomicInteger aggregatedGaugeContexts
protected final AtomicInteger aggregatedCountContexts
protected final AtomicInteger aggregatedSetContexts
protected final String metricsSentMetric
protected final String metricsByTypeSentMetric
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 final String aggregatedContextsMetric
protected final String aggregatedContextsByTypeMetric
protected String tags
protected StringBuilder tagBuilder
public StatsDProcessor processor
protected Timer timer
public void start(long flushInterval)
flushInterval - Telemetry flush interval, in milliseconds.public void stop()
public void flush()
protected String getTelemetryTags(String tags, Message.Type type)
public void incrMetricsSent(int value)
value - Value to increase metric withpublic void incrMetricsSent(int value,
Message.Type type)
value - Value to increase metric withtype - Message typepublic void incrGaugeSent(int value)
public void incrCountSent(int value)
public void incrHistogramSent(int value)
public void incrDistributionSent(int value)
public void incrSetSent(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 incrAggregatedContexts(int value)
public void incrAggregatedGaugeContexts(int value)
public void incrAggregatedCountContexts(int value)
public void incrAggregatedSetContexts(int value)
public void reset()
public String getTags()
Copyright © 2022. All rights reserved.