Class TelemetrySendingTask
- java.lang.Object
-
- java.util.TimerTask
-
- org.camunda.bpm.engine.impl.telemetry.reporter.TelemetrySendingTask
-
- All Implemented Interfaces:
java.lang.Runnable
public class TelemetrySendingTask extends java.util.TimerTask
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutor
commandExecutor
protected org.camunda.connect.spi.Connector<? extends org.camunda.connect.spi.ConnectorRequest<?>>
httpConnector
protected static TelemetryLogger
LOG
protected static java.util.Set<java.lang.String>
METRICS_TO_REPORT
protected MetricsRegistry
metricsRegistry
protected Data
staticData
protected java.lang.String
telemetryEndpoint
protected TelemetryRegistry
telemetryRegistry
protected int
telemetryRequestRetries
protected int
telemetryRequestTimeout
protected static java.lang.String
UUID4_PATTERN
-
Constructor Summary
Constructors Constructor Description TelemetrySendingTask(CommandExecutor commandExecutor, java.lang.String telemetryEndpoint, int telemetryRequestRetries, Data data, org.camunda.connect.spi.Connector<? extends org.camunda.connect.spi.ConnectorRequest<?>> httpConnector, TelemetryRegistry telemetryRegistry, MetricsRegistry metricsRegistry, int telemetryRequestTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,Metric>
calculateMetrics()
protected void
clearDynamicData()
protected java.util.Map<java.lang.String,Command>
fetchAndResetCommandCounts()
protected boolean
isSuccessStatusCode(int statusCode)
protected boolean
isTelemetryEnabled()
protected void
performDataSend(java.lang.Runnable runnable)
protected Internals
resolveDynamicData()
protected void
restoreDynamicData(Internals internals)
void
run()
protected void
sendData(Data dataToSend)
protected void
updateStaticData()
protected void
updateTelemetryFlag(boolean enabled)
protected java.lang.Boolean
validateData(Data dataToSend)
-
-
-
Field Detail
-
LOG
protected static final TelemetryLogger LOG
-
METRICS_TO_REPORT
protected static final java.util.Set<java.lang.String> METRICS_TO_REPORT
-
UUID4_PATTERN
protected static final java.lang.String UUID4_PATTERN
- See Also:
- Constant Field Values
-
commandExecutor
protected CommandExecutor commandExecutor
-
telemetryEndpoint
protected java.lang.String telemetryEndpoint
-
staticData
protected Data staticData
-
httpConnector
protected org.camunda.connect.spi.Connector<? extends org.camunda.connect.spi.ConnectorRequest<?>> httpConnector
-
telemetryRequestRetries
protected int telemetryRequestRetries
-
telemetryRegistry
protected TelemetryRegistry telemetryRegistry
-
metricsRegistry
protected MetricsRegistry metricsRegistry
-
telemetryRequestTimeout
protected int telemetryRequestTimeout
-
-
Constructor Detail
-
TelemetrySendingTask
public TelemetrySendingTask(CommandExecutor commandExecutor, java.lang.String telemetryEndpoint, int telemetryRequestRetries, Data data, org.camunda.connect.spi.Connector<? extends org.camunda.connect.spi.ConnectorRequest<?>> httpConnector, TelemetryRegistry telemetryRegistry, MetricsRegistry metricsRegistry, int telemetryRequestTimeout)
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
- Specified by:
run
in classjava.util.TimerTask
-
updateStaticData
protected void updateStaticData()
-
isTelemetryEnabled
protected boolean isTelemetryEnabled()
-
sendData
protected void sendData(Data dataToSend)
-
isSuccessStatusCode
protected boolean isSuccessStatusCode(int statusCode)
- Returns:
- true if status code is 2xx
-
clearDynamicData
protected void clearDynamicData()
-
restoreDynamicData
protected void restoreDynamicData(Internals internals)
-
resolveDynamicData
protected Internals resolveDynamicData()
-
fetchAndResetCommandCounts
protected java.util.Map<java.lang.String,Command> fetchAndResetCommandCounts()
-
calculateMetrics
protected java.util.Map<java.lang.String,Metric> calculateMetrics()
-
updateTelemetryFlag
protected void updateTelemetryFlag(boolean enabled)
-
performDataSend
protected void performDataSend(java.lang.Runnable runnable)
-
validateData
protected java.lang.Boolean validateData(Data dataToSend)
-
-