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 | Method and Description |
|---|---|
void |
add(TelemetryEvent event) |
void |
disable() |
void |
disableRunFlushBeforeException() |
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() |
static TelemetryService |
getInstance() |
int |
getNumOfRetryToTriggerTelemetry() |
String |
getServerDeploymentName() |
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(Map<String,String> params) |
void |
updateContext(String url,
Properties info) |
public static TelemetryService getInstance()
public void resetNumOfRetryToTriggerTelemetry()
public int getNumOfRetryToTriggerTelemetry()
public void setNumOfRetryToTriggerTelemetry(int num)
public void enable()
public void disable()
public boolean isEnabled()
public boolean runFlushBeforeException()
public void enableRunFlushBeforeException()
public void disableRunFlushBeforeException()
public net.minidev.json.JSONObject getContext()
public void updateContext(String url, Properties info)
public boolean isDeploymentEnabled()
public TelemetryEvent peek()
public void setBatchSize(int size)
public void resetBatchSize()
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.