public enum ApplicationInsights extends java.lang.Enum<ApplicationInsights>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
static void |
disableAutoAppearanceTracking()
Disable auto appearance management tracking before calling
start() or
at runtime. |
static void |
disableAutoCollection()
disables all auto-collection features
|
static void |
disableAutoPageViewTracking()
Disable auto page view tracking before calling
start() or
at runtime. |
static void |
disableAutoSessionManagement()
Disable auto session management tracking before calling
start() or
at runtime. |
static void |
enableAutoAppearanceTracking()
Enable auto appearance management tracking before calling
start() or
at runtime. |
static void |
enableAutoCollection()
Enables all auto-collection features.
|
static void |
enableAutoPageViewTracking()
Enable auto page view tracking before calling
start() or
at runtime. |
static void |
enableAutoSessionManagement()
Enable auto session management tracking before calling
start() or
at runtime. |
static ChannelType |
getChannelType()
Gets the currently used channel type
|
static java.util.Map<java.lang.String,java.lang.String> |
getCommonProperties()
Gets the properties which are common to all telemetry sent from this client.
|
static Configuration |
getConfiguration()
Gets the configuration for the ApplicationInsights instance
|
protected static java.lang.String |
getInstrumentationKey()
Get the instrumentation key associated with this app.
|
static TelemetryContext |
getTelemetryContext()
Gets the configuration for the ApplicationInsights instance
|
static boolean |
isDeveloperMode()
Check if developerMode is activated
|
static void |
renewSession(java.lang.String sessionId)
Force Application Insights to create a new session with a custom sessionID.
|
static void |
sendPendingData()
Triggers persisting and if applicable sending of queued data
note: this will be called
Configuration.maxBatchIntervalMs after
tracking any telemetry so it is not necessary to call this in most cases. |
static void |
setChannelType(ChannelType channelType)
Sets the channel type to be used for logging
|
static void |
setCommonProperties(java.util.Map<java.lang.String,java.lang.String> commonProperties)
Sets properties which are common to all telemetry sent form this client.
|
static void |
setDeveloperMode(boolean developerMode)
Activates the developer mode which.
|
static void |
setTelemetryDisabled(boolean disabled)
Enable / disable tracking of telemetry data.
|
static void |
setup(Context context,
Application application)
Configure Application Insights
Note: This should be called before start
|
static void |
setup(Context context,
Application application,
java.lang.String instrumentationKey)
Configure Application Insights
Note: This should be called before start
|
static void |
start()
Start ApplicationInsights
Note: This should be called after
isConfigured |
static ApplicationInsights |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ApplicationInsights[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ApplicationInsights INSTANCE
public static ApplicationInsights[] values()
for (ApplicationInsights c : ApplicationInsights.values()) System.out.println(c);
public static ApplicationInsights valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static void setup(Context context,
Application application)
application - the application context the application needed for auto collecting telemetry datapublic static void setup(Context context,
Application application,
java.lang.String instrumentationKey)
context - the application context associated with Application Insightsapplication - the application needed for auto collecting telemetry datainstrumentationKey - the instrumentation key associated with the apppublic static void start()
isConfiguredpublic static void sendPendingData()
Configuration.maxBatchIntervalMs after
tracking any telemetry so it is not necessary to call this in most cases.public static void enableAutoCollection()
start() or when ApplicationInsights is already running to change
AutoCollection settings at runtime.
Requires ApplicationInsights to be setup with an Application objectpublic static void disableAutoCollection()
public static void enableAutoPageViewTracking()
start() or
at runtime. This feature only works if ApplicationInsights has been setup
with an application.public static void disableAutoPageViewTracking()
start() or
at runtime. This feature only works if ApplicationInsights has been setup
with an application.public static void enableAutoSessionManagement()
start() or
at runtime. This feature only works if ApplicationInsights has been setup
with an application.public static void disableAutoSessionManagement()
start() or
at runtime. This feature only works if ApplicationInsights has been setup
with an application.public static void enableAutoAppearanceTracking()
start() or
at runtime. This feature only works if ApplicationInsights has been setup
with an application.public static void disableAutoAppearanceTracking()
start() or
at runtime. This feature only works if ApplicationInsights has been setup
with an application.public static void setTelemetryDisabled(boolean disabled)
disabled - if set to true, the telemetry feature will be disabledpublic static java.util.Map<java.lang.String,java.lang.String> getCommonProperties()
public static void setCommonProperties(java.util.Map<java.lang.String,java.lang.String> commonProperties)
commonProperties - a dictionary of properties to log with all telemetry.public static void setDeveloperMode(boolean developerMode)
developerMode - if true, developer mode will be activatedpublic static boolean isDeveloperMode()
public static Configuration getConfiguration()
public static TelemetryContext getTelemetryContext()
public static void renewSession(java.lang.String sessionId)
sessionId - a custom session ID used of the session to createpublic static void setChannelType(ChannelType channelType)
channelType - The channel type to usepublic static ChannelType getChannelType()
protected static java.lang.String getInstrumentationKey()