public class TelemetryService extends Object
Out of Band Telemetry Service This is a thread safe singleton queue containing telemetry messages
| Modifier and Type | Class and Description |
|---|---|
static class |
TelemetryService.TELEMETRY_SERVER_DEPLOYMENT |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
FLUSH_OCSP_REVOKED_EVENT |
| Modifier and Type | Method and Description |
|---|---|
void |
add(TelemetryEvent event) |
static void |
disable() |
void |
disableRunFlushBeforeException() |
static void |
enable() |
void |
enableRunFlushBeforeException() |
String |
exportQueueToString()
convert a list of json objects to a string
|
void |
flush()
force to flush events in the queue
|
net.minidev.json.JSONObject |
getContext() |
String |
getDriverConnectionString() |
static TelemetryService |
getInstance() |
int |
getNumOfRetryToTriggerTelemetry() |
String |
getServerDeploymentName() |
SnowflakeConnectString |
getSnowflakeConnectionString() |
boolean |
isDeploymentEnabled()
whether the telemetry service is enabled for current deployment
|
boolean |
isEnabled() |
void |
logHttpRequestTelemetryEvent(String eventName,
org.apache.http.client.methods.HttpRequestBase request,
int injectSocketTimeout,
AtomicBoolean canceling,
boolean withoutCookies,
boolean includeRetryParameters,
boolean includeRequestGuid,
org.apache.http.client.methods.CloseableHttpResponse response,
Exception savedEx,
String breakRetryReason,
long retryTimeout,
int retryCount,
String sqlState,
int errorCode)
log error http response to telemetry
|
void |
logOCSPExceptionTelemetryEvent(String eventType,
net.minidev.json.JSONObject telemetryData,
CertificateException ex)
log OCSP exception to telemetry
|
TelemetryEvent |
peek() |
void |
resetBatchSize() |
void |
resetNumOfRetryToTriggerTelemetry() |
boolean |
runFlushBeforeException() |
void |
setBatchSize(int size) |
void |
setDeployment(TelemetryService.TELEMETRY_SERVER_DEPLOYMENT deployment) |
void |
setNumOfRetryToTriggerTelemetry(int num) |
int |
size() |
void |
updateContext(SnowflakeConnectString conStr) |
void |
updateContextForIT(Map<String,String> params)
Note: Only used for IT
|
public static TelemetryService getInstance()
public void resetNumOfRetryToTriggerTelemetry()
public int getNumOfRetryToTriggerTelemetry()
public void setNumOfRetryToTriggerTelemetry(int num)
public static void enable()
public static void disable()
public boolean isEnabled()
public boolean runFlushBeforeException()
public void enableRunFlushBeforeException()
public void disableRunFlushBeforeException()
public net.minidev.json.JSONObject getContext()
public void updateContext(SnowflakeConnectString conStr)
public boolean isDeploymentEnabled()
public TelemetryEvent peek()
public void setBatchSize(int size)
public void resetBatchSize()
public String getDriverConnectionString()
public SnowflakeConnectString getSnowflakeConnectionString()
public void setDeployment(TelemetryService.TELEMETRY_SERVER_DEPLOYMENT deployment)
public String getServerDeploymentName()
public void add(TelemetryEvent event)
public void flush()
public String exportQueueToString()
public int size()
public void logOCSPExceptionTelemetryEvent(String eventType, net.minidev.json.JSONObject telemetryData, CertificateException ex)
public void logHttpRequestTelemetryEvent(String eventName, org.apache.http.client.methods.HttpRequestBase request, int injectSocketTimeout, AtomicBoolean canceling, boolean withoutCookies, boolean includeRetryParameters, boolean includeRequestGuid, org.apache.http.client.methods.CloseableHttpResponse response, Exception savedEx, String breakRetryReason, long retryTimeout, int retryCount, String sqlState, int errorCode)
Copyright © 2019. All rights reserved.