public class WavefrontNoOpClient extends Object implements WavefrontSender
| Constructor and Description |
|---|
WavefrontNoOpClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush()
Flushes buffer, if applicable
|
String |
getClientId() |
int |
getFailureCount()
Returns the number of failed writes to the server.
|
void |
sendDistribution(String name,
List<Pair<Double,Integer>> centroids,
Set<HistogramGranularity> histogramGranularities,
Long timestamp,
String source,
Map<String,String> tags) |
void |
sendEvent(String name,
long startMillis,
long endMillis,
String source,
Map<String,String> tags,
Map<String,String> annotations)
Sends the given event to Wavefront
|
void |
sendFormattedMetric(String point)
Similar to
WavefrontMetricSender.sendMetric(String, double, Long, String, Map), only the point
argument is expected to already be in Wavefront Data Format |
void |
sendLog(String name,
double value,
Long timestamp,
String source,
Map<String,String> tags)
This method is used for sending log meta-data to wavefront.
|
void |
sendMetric(String name,
double value,
Long timestamp,
String source,
Map<String,String> tags)
Sends the given metric to Wavefront
|
void |
sendSpan(String name,
long startMillis,
long durationMillis,
String source,
UUID traceId,
UUID spanId,
List<UUID> parents,
List<UUID> followsFrom,
List<Pair<String,String>> tags,
List<SpanLog> spanLogs)
Send a trace span to Wavefront.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsendDeltaCounter, sendDeltaCounterpublic String getClientId()
getClientId in interface WavefrontSenderpublic void flush()
throws IOException
BufferFlusherflush in interface BufferFlusherIOExceptionpublic int getFailureCount()
BufferFlushergetFailureCount in interface BufferFlusherpublic void sendEvent(String name, long startMillis, long endMillis, String source, Map<String,String> tags, Map<String,String> annotations) throws IOException
WavefrontEventSendersendEvent in interface WavefrontEventSendername - The name of the event. Spaces are replaced with '-' (dashes) and
quotes will be automatically escaped.startMillis - The timestamp in milliseconds when the event was started.endMillis - The timestamp in milliseconds when the event was ended.source - The source (or host) that's sending the event. If null, then assigned
by Wavefront.tags - The tags associated with this event.annotations - The annotations (details, type, severity, e.g.) associated with this eventIOException - if there was an error sending the event.public void sendDistribution(String name, List<Pair<Double,Integer>> centroids, Set<HistogramGranularity> histogramGranularities, Long timestamp, String source, Map<String,String> tags) throws IOException
sendDistribution in interface WavefrontHistogramSendername - The name of the histogram distribution. Spaces are replaced
with '-' (dashes) and quotes will be automatically escaped.centroids - The distribution of histogram points to be sent.
Each centroid is a 2-dimensional Pair where the
first dimension is the mean value (Double) of the centroid
and second dimension is the count of points in that centroid.histogramGranularities - The set of intervals (minute, hour, and/or day) by which
histogram data should be aggregated.timestamp - The timestamp in milliseconds since the epoch to be sent.
If null then the timestamp is assigned by Wavefront when
data is received.source - The source (or host) that's sending the histogram. If
null, then assigned by Wavefront.tags - The tags associated with this histogram.IOException - If there was an error sending the histogram.public void sendLog(String name, double value, Long timestamp, String source, Map<String,String> tags) throws IOException
WavefrontLogSendersendLog in interface WavefrontLogSendername - Log file name/sourcevalue - Value for log streamtimestamp - epoch timestampsource - Logging sourcetags - Labels associated with log sourceIOExceptionpublic void sendMetric(String name, double value, Long timestamp, String source, Map<String,String> tags) throws IOException
WavefrontMetricSendersendMetric in interface WavefrontMetricSendername - The name of the metric. Spaces are replaced with '-' (dashes) and quotes will
be automatically escaped.value - The value to be sent.timestamp - The timestamp in milliseconds since the epoch to be sent. If null then the
timestamp is assigned by Wavefront when data is received.source - The source (or host) that's sending the metric. If null then assigned by
Wavefront.tags - The tags associated with this metric.IOException - if there was an error sending the metric.public void sendFormattedMetric(String point) throws IOException
WavefrontMetricSenderWavefrontMetricSender.sendMetric(String, double, Long, String, Map), only the point
argument is expected to already be in Wavefront Data FormatsendFormattedMetric in interface WavefrontMetricSenderpoint - a single metric, encoded in Wavefront Data FormatIOException - if there was an error sending the metric.public void sendSpan(String name, long startMillis, long durationMillis, String source, UUID traceId, UUID spanId, List<UUID> parents, List<UUID> followsFrom, List<Pair<String,String>> tags, List<SpanLog> spanLogs) throws IOException
WavefrontTracingSpanSendersendSpan in interface WavefrontTracingSpanSendername - The operation name of the span.startMillis - The start time in milliseconds for this span.durationMillis - The duration of the span in milliseconds.source - The source (or host) that's sending the span. If null, then
assigned by Wavefront.traceId - The unique trace ID for the span.spanId - The unique span ID for the span.parents - The list of parent span IDs, can be null if this is a root span.followsFrom - The list of preceding span IDs, can be null if this is a root span.tags - The span tags associated with this span. Supports repeated tags.spanLogs - The span logs associated with this span.IOException - If there was an error sending the span.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2022. All rights reserved.