Package com.arpnetworking.tsdcore.sinks
Class MonitordSink
java.lang.Object
com.arpnetworking.tsdcore.sinks.BaseSink
com.arpnetworking.tsdcore.sinks.HttpPostSink
com.arpnetworking.tsdcore.sinks.MonitordSink
- All Implemented Interfaces:
Sink
Publishes aggregations to Monitord. This class is thread safe.
- Author:
- Brandon Arp (brandon dot arp at inscopemetrics dot com)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Implementation of builder pattern forMonitordSink
. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.asynchttpclient.Request
createRequest
(org.asynchttpclient.AsyncHttpClient client, byte[] serializedData) Creates an HTTP request from a serialized data entry.protected Collection<com.arpnetworking.tsdcore.sinks.HttpPostSink.SerializedDatum>
serialize
(PeriodicData periodicData) Serialize thePeriodicData
instance for posting.Generate a Steno log compatible representation.Methods inherited from class com.arpnetworking.tsdcore.sinks.HttpPostSink
close, createRequests, getAysncHttpClientUri, getMaximumAttempts, getRetryBaseBackoff, getRetryMaximumDelay, getUri, recordAggregateData
Methods inherited from class com.arpnetworking.tsdcore.sinks.BaseSink
getMetricSafeName, getName, toString
-
Method Details
-
toLogValue
Generate a Steno log compatible representation.- Overrides:
toLogValue
in classHttpPostSink
- Returns:
- Steno log compatible representation.
-
serialize
protected Collection<com.arpnetworking.tsdcore.sinks.HttpPostSink.SerializedDatum> serialize(PeriodicData periodicData) Description copied from class:HttpPostSink
Serialize thePeriodicData
instance for posting.- Specified by:
serialize
in classHttpPostSink
- Parameters:
periodicData
- ThePeriodicData
to be serialized.- Returns:
- The serialized representation of
PeriodicData
.
-
createRequest
protected org.asynchttpclient.Request createRequest(org.asynchttpclient.AsyncHttpClient client, byte[] serializedData) Description copied from class:HttpPostSink
Creates an HTTP request from a serialized data entry. Default is anPOST
containing serializedData as the body with content type of application/json- Overrides:
createRequest
in classHttpPostSink
- Parameters:
client
- The http client to build the request with.serializedData
- The serialized data.- Returns:
Request
to execute
-