Class TelemetrySendingTask

  • All Implemented Interfaces:
    Runnable

    public class TelemetrySendingTask
    extends TimerTask
    • Field Detail

      • METRICS_TO_REPORT

        protected static final Set<String> METRICS_TO_REPORT
      • telemetryEndpoint

        protected String telemetryEndpoint
      • httpConnector

        protected org.camunda.connect.spi.Connector<? extends org.camunda.connect.spi.ConnectorRequest<?>> httpConnector
      • telemetryRequestRetries

        protected int telemetryRequestRetries
      • telemetryRequestTimeout

        protected int telemetryRequestTimeout
    • Constructor Detail

      • TelemetrySendingTask

        public TelemetrySendingTask​(CommandExecutor commandExecutor,
                                    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

      • updateAndSendData

        public TelemetryDataImpl updateAndSendData​(boolean sendData,
                                                   boolean addLegacyNames)
      • updateStaticData

        protected void updateStaticData()
      • updateDataCollectionStartDate

        public void updateDataCollectionStartDate()
      • isTelemetryEnabled

        protected boolean isTelemetryEnabled()
      • 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 Map<String,​Command> fetchAndResetCommandCounts​(boolean reset)
      • calculateMetrics

        protected Map<String,​Metric> calculateMetrics​(boolean reset,
                                                            boolean addLegacyNames)
      • performDataSend

        protected void performDataSend​(Runnable runnable)