/*
 * Copyright (c) 2012-2019 Snowflake Computing Inc. All rights reserved.
 */
package net.snowflake.client.jdbc.telemetry;

import java.util.concurrent.Future;

public interface Telemetry {
  /**
   * Attempt to add log to batch, and suppress exceptions thrown in case of failure
   *
   * @param log entry to add
   */
  void addLogToBatch(TelemetryData log);

  /** Close telemetry connector and send any unsubmitted logs */
  void close();

  /**
   * Send all cached logs to server
   *
   * @return future indicating whether the logs were sent successfully
   */
  Future<Boolean> sendBatchAsync();

  void postProcess(String queryId, String sqlState, int vendorCode, Throwable ex);
}

@@ -600,16 +600,383 @@
 ync();%0A%0A
+  /**%0A   * A hook for post-processing after sending telemetry data. Can be used, for example, for%0A   * additional error handling.%0A   *%0A   * @param queryId The query id%0A   * @param sqlState The SQL state as defined in net.snowflake.common.core.SqlState%0A   * @param vendorCode The vendor code for localized messages%0A   * @param ex The throwable that caused this.%0A   */%0A
   void p

Add Javadoc