public enum AppInsightHelper extends Enum<AppInsightHelper> implements TelemetryProxy
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Field and Description |
|---|---|
private com.microsoft.applicationinsights.TelemetryClient |
client |
private Map<String,String> |
defaultProperties |
private boolean |
isEnabled |
private String |
sessionId |
| Modifier and Type | Method and Description |
|---|---|
void |
addDefaultProperty(String key,
String value) |
void |
disable() |
void |
enable() |
Map<String,String> |
getDefaultProperties() |
String |
getInstallationId() |
String |
getSessionId() |
void |
initTelemetryHttpClient() |
protected Map<String,String> |
mergeProperties(Map<String,String> customProperties,
boolean overrideDefaultProperties) |
void |
trackEvent(String eventName) |
void |
trackEvent(String eventName,
Map<String,String> customProperties) |
void |
trackEvent(String eventName,
Map<String,String> customProperties,
boolean overrideDefaultProperties) |
static AppInsightHelper |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AppInsightHelper[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AppInsightHelper INSTANCE
private boolean isEnabled
private String sessionId
private com.microsoft.applicationinsights.TelemetryClient client
public static AppInsightHelper[] values()
for (AppInsightHelper c : AppInsightHelper.values()) System.out.println(c);
public static AppInsightHelper valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic void enable()
enable in interface TelemetryProxypublic void disable()
disable in interface TelemetryProxypublic void trackEvent(String eventName)
trackEvent in interface TelemetryProxypublic void trackEvent(String eventName, Map<String,String> customProperties)
trackEvent in interface TelemetryProxypublic void trackEvent(String eventName, Map<String,String> customProperties, boolean overrideDefaultProperties)
trackEvent in interface TelemetryProxypublic void initTelemetryHttpClient()
public String getSessionId()
public String getInstallationId()
public void addDefaultProperty(String key, String value)
addDefaultProperty in interface TelemetryProxyprotected Map<String,String> mergeProperties(Map<String,String> customProperties, boolean overrideDefaultProperties)
public Map<String,String> getDefaultProperties()
getDefaultProperties in interface TelemetryProxyCopyright © 2019. All rights reserved.