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 |
Constructor and Description |
---|
TelemetryService() |
Modifier and Type | Method and Description |
---|---|
void |
count()
Count one more successfully reported events
|
static void |
disable() |
static void |
enable() |
String |
exportQueueToLogString(TelemetryEvent event) |
String |
exportQueueToString(TelemetryEvent event)
Convert an event to a payload in string
|
int |
getClientFailureCount() |
net.minidev.json.JSONObject |
getContext() |
String |
getDriverConnectionString() |
int |
getEventCount() |
static TelemetryService |
getInstance() |
String |
getLastClientError() |
int |
getNumOfRetryToTriggerTelemetry() |
String |
getServerDeploymentName() |
int |
getServerFailureCount() |
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
|
void |
report(TelemetryEvent event)
Report the event to the telemetry server in a new thread
|
void |
resetNumOfRetryToTriggerTelemetry() |
void |
setDeployment(TelemetryService.TELEMETRY_SERVER_DEPLOYMENT deployment) |
void |
setNumOfRetryToTriggerTelemetry(int num) |
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 net.minidev.json.JSONObject getContext()
public void updateContext(SnowflakeConnectString conStr)
public boolean isDeploymentEnabled()
public String getDriverConnectionString()
public SnowflakeConnectString getSnowflakeConnectionString()
public void setDeployment(TelemetryService.TELEMETRY_SERVER_DEPLOYMENT deployment)
public String getServerDeploymentName()
public int getEventCount()
public int getClientFailureCount()
public int getServerFailureCount()
public String getLastClientError()
public void count()
public void report(TelemetryEvent event)
public String exportQueueToString(TelemetryEvent event)
public String exportQueueToLogString(TelemetryEvent event)
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 © 2021. All rights reserved.