Class TelemetrySendingTask
- java.lang.Object
-
- java.util.TimerTask
-
- org.camunda.bpm.engine.impl.telemetry.reporter.TelemetrySendingTask
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TelemetrySendingTask.SendInitialMsgCmd
-
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 Set<String>
METRICS_TO_REPORT
protected MetricsRegistry
metricsRegistry
protected boolean
sendInitialMessage
protected Data
staticData
protected static String
TELEMETRY_INIT_MESSAGE_SENT_NAME
protected String
telemetryEndpoint
protected TelemetryRegistry
telemetryRegistry
protected int
telemetryRequestRetries
protected int
telemetryRequestTimeout
protected static String
UUID4_PATTERN
-
Constructor Summary
Constructors Constructor Description TelemetrySendingTask(CommandExecutor commandExecutor, String telemetryEndpoint, int telemetryRequestRetries, Data data, org.camunda.connect.spi.Connector<? extends org.camunda.connect.spi.ConnectorRequest<?>> httpConnector, TelemetryRegistry telemetryRegistry, MetricsRegistry metricsRegistry, int telemetryRequestTimeout, boolean sendInitialMessage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Metric>
calculateMetrics()
protected void
clearDynamicData()
protected Map<String,Command>
fetchAndResetCommandCounts()
protected boolean
isSuccessStatusCode(int statusCode)
protected boolean
isTelemetryEnabled()
protected void
performDataSend(Boolean isInitialMessage, Runnable runnable)
protected Internals
resolveDynamicData()
protected void
restoreDynamicData(Internals internals)
void
run()
protected void
sendData(Data dataToSend, boolean isInitialMessage)
protected void
sendInitialMessage()
protected void
sendInitialMessage(CommandContext commandContext)
protected void
updateStaticData()
protected void
updateTelemetryFlag(boolean enabled)
protected Boolean
validateData(Data dataToSend)
-
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
-
-
-
Field Detail
-
LOG
protected static final TelemetryLogger LOG
-
TELEMETRY_INIT_MESSAGE_SENT_NAME
protected static final String TELEMETRY_INIT_MESSAGE_SENT_NAME
- See Also:
- Constant Field Values
-
UUID4_PATTERN
protected static final String UUID4_PATTERN
- See Also:
- Constant Field Values
-
commandExecutor
protected CommandExecutor commandExecutor
-
telemetryEndpoint
protected 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
-
sendInitialMessage
protected boolean sendInitialMessage
-
-
Constructor Detail
-
TelemetrySendingTask
public TelemetrySendingTask(CommandExecutor commandExecutor, String telemetryEndpoint, int telemetryRequestRetries, Data data, org.camunda.connect.spi.Connector<? extends org.camunda.connect.spi.ConnectorRequest<?>> httpConnector, TelemetryRegistry telemetryRegistry, MetricsRegistry metricsRegistry, int telemetryRequestTimeout, boolean sendInitialMessage)
-
-
Method Detail
-
sendInitialMessage
protected void sendInitialMessage()
-
sendInitialMessage
protected void sendInitialMessage(CommandContext commandContext)
-
updateStaticData
protected void updateStaticData()
-
isTelemetryEnabled
protected boolean isTelemetryEnabled()
-
sendData
protected void sendData(Data dataToSend, boolean isInitialMessage)
-
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()
-
updateTelemetryFlag
protected void updateTelemetryFlag(boolean enabled)
-
-