public interface HeartBeatProviderInterface
This interface defines an implementation for configuring the properties of Application Insights
SDK. It allows users to set and get the configuration properties of HeartBeat module. A user can
create or bring his own custom implementation of Heartbeat module if wished provided that he abides
to the contracts set by this Interface.
Default concrete Implementation HeartBeatProvider
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_HEARTBEAT_INTERVAL
Default interval in seconds to transmit heartbeat pulse.
|
static long |
MINIMUM_HEARTBEAT_INTERVAL
Minimum interval which can be configured by user to transmit heartbeat pulse.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addHeartBeatProperty(java.lang.String propertyName,
java.lang.String propertyValue,
boolean isHealthy)
Adds the heartbeat property to the heartbeat payload.
|
boolean |
containsHeartBeatProperty(java.lang.String Key)
Returns true if the HeartBeat provider has the given HeartBeat Property
|
java.util.List<java.lang.String> |
getExcludedHeartBeatProperties()
Returns the list of excluded heartbeat properties.
|
java.util.List<java.lang.String> |
getExcludedHeartBeatPropertyProviders()
This returns the list of Excluded Heart Beat Providers
|
long |
getHeartBeatInterval()
Gets the currently set heartbeat interval.
|
java.lang.String |
getInstrumentationKey()
Gets the instrumentation key used by telemetry client sending heartbeat.
|
void |
initialize(TelemetryConfiguration configuration)
This method initializes the concrete module.
|
boolean |
isHeartBeatEnabled()
Returns if heartbeat is enabled or not.
|
void |
setExcludedHeartBeatProperties(java.util.List<java.lang.String> excludedHeartBeatProperties)
Sets the list of properties to be excluded from heartbeat payload.
|
void |
setExcludedHeartBeatPropertyProviders(java.util.List<java.lang.String> excludedHeartBeatPropertyProviders)
Sets the list of excluded heartbeat providers.
|
void |
setHeartBeatEnabled(boolean isEnabled)
Enables or disables heartbeat module.
|
void |
setHeartBeatInterval(long timeUnit)
Sets the time interval of heartbeat in seconds.
|
boolean |
setHeartBeatProperty(java.lang.String propertyName,
java.lang.String propertyValue,
boolean isHealthy)
Sets the value of already existing heartbeat property in the payload.
|
void |
setInstrumentationKey(java.lang.String key)
Sets the instrumentation key
|
static final long DEFAULT_HEARTBEAT_INTERVAL
static final long MINIMUM_HEARTBEAT_INTERVAL
java.lang.String getInstrumentationKey()
void setInstrumentationKey(java.lang.String key)
key - Key to be setvoid initialize(TelemetryConfiguration configuration)
configuration - TelemetryConfigurationboolean addHeartBeatProperty(java.lang.String propertyName,
java.lang.String propertyValue,
boolean isHealthy)
propertyName - Name of the property to be added in Heartbeat payloadpropertyValue - Value of the property to be added in Heartbeat payloadisHealthy - indicates if heartbeat is healthyboolean setHeartBeatProperty(java.lang.String propertyName,
java.lang.String propertyValue,
boolean isHealthy)
propertyName - Name of the property to be added in Heartbeat payloadpropertyValue - Value of the property to be added in Heartbeat payloadisHealthy - indicates if heartbeat is healthyboolean isHeartBeatEnabled()
void setHeartBeatEnabled(boolean isEnabled)
isEnabled - state of the heartbeat (enabled/disabled)java.util.List<java.lang.String> getExcludedHeartBeatPropertyProviders()
void setExcludedHeartBeatPropertyProviders(java.util.List<java.lang.String> excludedHeartBeatPropertyProviders)
excludedHeartBeatPropertyProviders - List of heartbeat providers to be excludedlong getHeartBeatInterval()
void setHeartBeatInterval(long timeUnit)
timeUnit - Heartbeat interval in secondsjava.util.List<java.lang.String> getExcludedHeartBeatProperties()
void setExcludedHeartBeatProperties(java.util.List<java.lang.String> excludedHeartBeatProperties)
excludedHeartBeatProperties - List of properties to be excludedboolean containsHeartBeatProperty(java.lang.String Key)
Key -