Class LatencyDatadogComputation
- java.lang.Object
-
- org.nuxeo.lib.stream.computation.AbstractComputation
-
- org.nuxeo.lib.stream.tools.command.LatencyTrackerComputation
-
- org.nuxeo.lib.stream.tools.command.LatencyDatadogComputation
-
- All Implemented Interfaces:
Computation
public class LatencyDatadogComputation extends LatencyTrackerComputation
A computation that sends periodically latencies to Datadog.- Since:
- 11.1
-
-
Field Summary
Fields Modifier and Type Field Description protected StringapiKeyprotected StringbasePrefixprotected Stringhostnameprotected static StringHOSTNAME_UNKNOWNprotected booleanpartitionprotected List<String>tagsprotected org.coursera.metrics.datadog.transport.HttpTransporttransport-
Fields inherited from class org.nuxeo.lib.stream.tools.command.LatencyTrackerComputation
codec, count, intervalMs, logGroups, logNames, manager, OUTPUT_STREAM, refreshGroupCounter, remaining, verbose
-
Fields inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
INPUT_1, INPUT_2, INPUT_3, INPUT_NULL, metadata, OUTPUT_1, OUTPUT_2, OUTPUT_3, OUTPUT_4
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()Called when the framework is ready to shutdown the computation.protected StringgetHostName()voidinit(ComputationContext context)Called when the framework has registered the computation successfully.protected voidprocessLatencies(ComputationContext context, LogPartitionGroup logGroup, List<Latency> latencies)protected voidpublishMetrics(Latency latency, String prefix, String partition, Name stream, Name group)-
Methods inherited from class org.nuxeo.lib.stream.tools.command.LatencyTrackerComputation
decodeKey, encodeKey, encodeLatency, getLogGroup, processRecord, processTimer, refreshGroup
-
Methods inherited from class org.nuxeo.lib.stream.computation.AbstractComputation
metadata, processFailure, processRetry
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.lib.stream.computation.Computation
signalStop
-
-
-
-
Field Detail
-
HOSTNAME_UNKNOWN
protected static final String HOSTNAME_UNKNOWN
- See Also:
- Constant Field Values
-
apiKey
protected final String apiKey
-
basePrefix
protected final String basePrefix
-
partition
protected final boolean partition
-
hostname
protected final String hostname
-
transport
protected org.coursera.metrics.datadog.transport.HttpTransport transport
-
-
Method Detail
-
getHostName
protected String getHostName()
-
init
public void init(ComputationContext context)
Description copied from interface:ComputationCalled when the framework has registered the computation successfully. Gives users a first opportunity to schedule timer callbacks and produce records. This method can be called multiple times.- Specified by:
initin interfaceComputation- Overrides:
initin classLatencyTrackerComputation- Parameters:
context- The computation context object provided by the system.
-
processLatencies
protected void processLatencies(ComputationContext context, LogPartitionGroup logGroup, List<Latency> latencies)
- Overrides:
processLatenciesin classLatencyTrackerComputation
-
publishMetrics
protected void publishMetrics(Latency latency, String prefix, String partition, Name stream, Name group)
-
destroy
public void destroy()
Description copied from interface:ComputationCalled when the framework is ready to shutdown the computation. Gives users a chance to perform some cleanup before the process is killed.- Specified by:
destroyin interfaceComputation- Overrides:
destroyin classLatencyTrackerComputation
-
-