Class NoOpTelemetryClient

  • All Implemented Interfaces:
    Telemetry

    public class NoOpTelemetryClient
    extends Object
    implements Telemetry
    Telemetry client that is doing nothing. Mainly used in testing code
    • Constructor Detail

      • NoOpTelemetryClient

        public NoOpTelemetryClient()
    • Method Detail

      • addLogToBatch

        public void addLogToBatch​(TelemetryData log)
        Description copied from interface: Telemetry
        Attempt to add log to batch, and suppress exceptions thrown in case of failure
        Specified by:
        addLogToBatch in interface Telemetry
        Parameters:
        log - entry to add
      • close

        public void close()
        Description copied from interface: Telemetry
        Close telemetry connector and send any unsubmitted logs
        Specified by:
        close in interface Telemetry
      • sendBatchAsync

        public Future<Boolean> sendBatchAsync()
        Description copied from interface: Telemetry
        Send all cached logs to server
        Specified by:
        sendBatchAsync in interface Telemetry
        Returns:
        future indicating whether the logs were sent successfully
      • postProcess

        public void postProcess​(String queryId,
                                String sqlState,
                                int vendorCode,
                                Throwable ex)
        Description copied from interface: Telemetry
        A hook for post-processing after sending telemetry data. Can be used, for example, for additional error handling.
        Specified by:
        postProcess in interface Telemetry
        Parameters:
        queryId - The query id
        sqlState - The SQL state as defined in net.snowflake.common.core.SqlState
        vendorCode - The vendor code for localized messages
        ex - The throwable that caused this.