public class WavefrontMultiClient extends java.lang.Object implements WavefrontSender, java.lang.Runnable
| Modifier and Type | Class and Description |
|---|---|
static class |
WavefrontMultiClient.Builder |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush()
Flushes buffer, if applicable
|
WavefrontSender |
getClient(java.lang.String clientId)
Provide direct access to a specific client by id.
|
java.lang.String |
getClientId()
getClientId.
|
int |
getFailureCount()
Returns the number of failed writes to the server.
|
java.util.Map<java.lang.String,java.lang.Integer> |
getFailureCountPerSender()
Obtain the failure counts per endpoint.
|
void |
run() |
void |
sendDistribution(java.lang.String name,
java.util.List<Pair<java.lang.Double,java.lang.Integer>> centroids,
java.util.Set<HistogramGranularity> histogramGranularities,
java.lang.Long timestamp,
java.lang.String source,
java.util.Map<java.lang.String,java.lang.String> tags)
sendDistribution.
|
void |
sendEvent(java.lang.String name,
long startMillis,
long endMillis,
java.lang.String source,
java.util.Map<java.lang.String,java.lang.String> tags,
java.util.Map<java.lang.String,java.lang.String> annotations)
Sends the given event to Wavefront
|
void |
sendFormattedMetric(java.lang.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(java.lang.String name,
double value,
java.lang.Long timestamp,
java.lang.String source,
java.util.Map<java.lang.String,java.lang.String> tags)
This method is used for sending log meta-data to wavefront.
|
void |
sendMetric(java.lang.String name,
double value,
java.lang.Long timestamp,
java.lang.String source,
java.util.Map<java.lang.String,java.lang.String> tags)
Sends the given metric to Wavefront
|
void |
sendSpan(java.lang.String name,
long startMillis,
long durationMillis,
java.lang.String source,
java.util.UUID traceId,
java.util.UUID spanId,
java.util.List<java.util.UUID> parents,
java.util.List<java.util.UUID> followsFrom,
java.util.List<Pair<java.lang.String,java.lang.String>> tags,
java.util.List<SpanLog> spanLogs)
Send a trace span to Wavefront.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsendDeltaCounter, sendDeltaCounterpublic WavefrontSender getClient(java.lang.String clientId)
clientId - the unique client ID generated when a Proxy or DirectIngestion Client is instantiated.public void flush()
throws java.io.IOException
flush in interface BufferFlusherjava.io.IOException - throws an Exceptionpublic int getFailureCount()
getFailureCount in interface BufferFlusherpublic java.util.Map<java.lang.String,java.lang.Integer> getFailureCountPerSender()
public void sendMetric(java.lang.String name,
double value,
@Nullable
java.lang.Long timestamp,
@Nullable
java.lang.String source,
@Nullable
java.util.Map<java.lang.String,java.lang.String> tags)
throws java.io.IOException
sendMetric 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.java.io.IOException - if there was an error sending the metric.public void sendLog(java.lang.String name,
double value,
java.lang.Long timestamp,
java.lang.String source,
java.util.Map<java.lang.String,java.lang.String> tags)
throws java.io.IOException
sendLog in interface WavefrontLogSendername - Log file name/sourcevalue - Value for log streamtimestamp - epoch timestampsource - Logging sourcetags - Labels associated with log sourcejava.io.IOException - throws an Exceptionpublic void sendFormattedMetric(java.lang.String point)
throws java.io.IOException
WavefrontMetricSender.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 Formatjava.io.IOException - if there was an error sending the metric.public void sendDistribution(java.lang.String name,
java.util.List<Pair<java.lang.Double,java.lang.Integer>> centroids,
java.util.Set<HistogramGranularity> histogramGranularities,
@Nullable
java.lang.Long timestamp,
@Nullable
java.lang.String source,
@Nullable
java.util.Map<java.lang.String,java.lang.String> tags)
throws java.io.IOException
sendDistribution.
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.java.io.IOException - If there was an error sending the histogram.public void sendSpan(java.lang.String name,
long startMillis,
long durationMillis,
@Nullable
java.lang.String source,
java.util.UUID traceId,
java.util.UUID spanId,
@Nullable
java.util.List<java.util.UUID> parents,
@Nullable
java.util.List<java.util.UUID> followsFrom,
@Nullable
java.util.List<Pair<java.lang.String,java.lang.String>> tags,
@Nullable
java.util.List<SpanLog> spanLogs)
throws java.io.IOException
sendSpan 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.java.io.IOException - If there was an error sending the span.public void sendEvent(java.lang.String name,
long startMillis,
long endMillis,
@Nullable
java.lang.String source,
@Nullable
java.util.Map<java.lang.String,java.lang.String> tags,
@Nullable
java.util.Map<java.lang.String,java.lang.String> annotations)
throws java.io.IOException
sendEvent 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 eventjava.io.IOException - if there was an error sending the event.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic void run()
run in interface java.lang.Runnablepublic java.lang.String getClientId()
getClientId.
getClientId in interface WavefrontSenderString objectCopyright © 2023. All rights reserved.