public class AppInsightsProxy extends Object implements TelemetryProxy
| Modifier and Type | Field and Description |
|---|---|
protected com.microsoft.applicationinsights.TelemetryClient |
client |
protected TelemetryConfiguration |
configuration |
static String |
CONFIGURATION_FILE |
protected Map<String,String> |
defaultProperties |
static Pattern |
INSTRUMENTATION_KEY_PATTERN |
protected boolean |
isEnabled |
| Constructor and Description |
|---|
AppInsightsProxy(TelemetryConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDefaultProperty(String key,
String value) |
void |
disable() |
void |
enable() |
Map<String,String> |
getDefaultProperties() |
protected Map<String,String> |
mergeProperties(Map<String,String> defaultProperties,
Map<String,String> customProperties,
boolean overrideDefaultProperties) |
private com.microsoft.applicationinsights.TelemetryConfiguration |
readConfigurationFromFile() |
private String |
readInstrumentationKeyFromConfiguration() |
void |
trackEvent(String eventName) |
void |
trackEvent(String eventName,
Map<String,String> customProperties) |
void |
trackEvent(String eventName,
Map<String,String> customProperties,
boolean overrideDefaultProperties) |
public static final String CONFIGURATION_FILE
public static final Pattern INSTRUMENTATION_KEY_PATTERN
protected com.microsoft.applicationinsights.TelemetryClient client
protected TelemetryConfiguration configuration
protected boolean isEnabled
public AppInsightsProxy(TelemetryConfiguration config)
private com.microsoft.applicationinsights.TelemetryConfiguration readConfigurationFromFile()
private String readInstrumentationKeyFromConfiguration()
public void addDefaultProperty(String key, String value)
addDefaultProperty in interface TelemetryProxypublic Map<String,String> getDefaultProperties()
getDefaultProperties in interface TelemetryProxypublic 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 TelemetryProxyCopyright © 2020. All rights reserved.