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 CommandExecutorcommandExecutorprotected org.camunda.connect.spi.Connector<? extends org.camunda.connect.spi.ConnectorRequest<?>>httpConnectorprotected static TelemetryLoggerLOGprotected static java.util.Set<java.lang.String>METRICS_TO_REPORTprotected MetricsRegistrymetricsRegistryprotected TelemetryDataImplstaticDataprotected java.lang.StringtelemetryEndpointprotected TelemetryRegistrytelemetryRegistryprotected inttelemetryRequestRetriesprotected inttelemetryRequestTimeoutprotected static java.lang.StringUUID4_PATTERN
-
Constructor Summary
Constructors Constructor Description TelemetrySendingTask(CommandExecutor commandExecutor, java.lang.String telemetryEndpoint, int telemetryRequestRetries, TelemetryDataImpl 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(boolean reset, boolean addLegacyNames)protected java.util.Map<java.lang.String,Command>fetchAndResetCommandCounts(boolean reset)protected booleanisSuccessStatusCode(int statusCode)protected booleanisTelemetryEnabled()protected voidperformDataSend(java.lang.Runnable runnable)protected InternalsImplresolveDynamicData(boolean reset, boolean addLegacyNames)protected voidrestoreDynamicData(InternalsImpl internals)voidrun()protected voidsendData(TelemetryDataImpl dataToSend)TelemetryDataImplupdateAndSendData(boolean sendData, boolean addLegacyNames)protected voidupdateStaticData()protected java.lang.BooleanvalidateData(TelemetryDataImpl dataToSend)
-
-
-
Field Detail
-
METRICS_TO_REPORT
protected static final java.util.Set<java.lang.String> METRICS_TO_REPORT
-
LOG
protected static final TelemetryLogger LOG
-
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 TelemetryDataImpl 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, TelemetryDataImpl 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:
runin interfacejava.lang.Runnable- Specified by:
runin classjava.util.TimerTask
-
updateAndSendData
public TelemetryDataImpl updateAndSendData(boolean sendData, boolean addLegacyNames)
-
updateStaticData
protected void updateStaticData()
-
isTelemetryEnabled
protected boolean isTelemetryEnabled()
-
sendData
protected void sendData(TelemetryDataImpl dataToSend)
-
isSuccessStatusCode
protected boolean isSuccessStatusCode(int statusCode)
- Returns:
- true if status code is 2xx
-
restoreDynamicData
protected void restoreDynamicData(InternalsImpl internals)
-
resolveDynamicData
protected InternalsImpl resolveDynamicData(boolean reset, boolean addLegacyNames)
-
fetchAndResetCommandCounts
protected java.util.Map<java.lang.String,Command> fetchAndResetCommandCounts(boolean reset)
-
calculateMetrics
protected java.util.Map<java.lang.String,Metric> calculateMetrics(boolean reset, boolean addLegacyNames)
-
performDataSend
protected void performDataSend(java.lang.Runnable runnable)
-
validateData
protected java.lang.Boolean validateData(TelemetryDataImpl dataToSend)
-
-