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 |
enable() |
void |
flush()
force to flush events in the queue
|
net.minidev.json.JSONObject |
getContext() |
TelemetryEvent |
getEvent(int i) |
static TelemetryService |
getInstance() |
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
|
String |
logsToString(LinkedList<TelemetryEvent> queue)
convert a list of json objects to a string
|
void |
setDeployment(TelemetryService.TELEMETRY_SERVER_DEPLOYMENT deployment) |
int |
size() |
void |
updateContext(Map<String,String> params) |
void |
updateContext(String url,
Properties info) |
public static TelemetryService getInstance()
public void enable()
public void disable()
public boolean isEnabled()
public net.minidev.json.JSONObject getContext()
public void updateContext(String url, Properties info)
public boolean isDeploymentEnabled()
public TelemetryEvent getEvent(int i)
public void setDeployment(TelemetryService.TELEMETRY_SERVER_DEPLOYMENT deployment)
public String getServerDeploymentName()
public void add(TelemetryEvent event)
public void flush()
public String logsToString(LinkedList<TelemetryEvent> queue)
queue - a list of json objectspublic int size()
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.