<PackageReference Include="Microsoft.ApplicationInsights" Version="2.23.0" />

Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.HeartbeatProvider

Implementation of heartbeat functionality.
public static readonly TimeSpan DefaultHeartbeatInterval

The default interval between heartbeats if not specified by the user. Left public for use in unit tests.

public static readonly TimeSpan MinimumHeartbeatInterval

The minimum interval that can be set between heartbeats.

public IList<string> ExcludedHeartbeatProperties { get; }

Gets a list of default field names that should not be sent with each heartbeat.

public IList<string> ExcludedHeartbeatPropertyProviders { get; }

Gets a list of default heartbeat property providers that are disabled and will not contribute to the default heartbeat properties.

public TimeSpan HeartbeatInterval { get; set; }

Gets or sets the currently defined interval between heartbeats.

public string InstrumentationKey { get; set; }

Gets or sets the currently defined instrumentation key to send heartbeat telemetry items to. Note that if the heartbeat provider has not been initialized yet, this key would get reset to whatever the telemetry configuration the heartbeat provider is initialized with.

public bool IsHeartbeatEnabled { get; set; }

Gets or sets a value indicating whether or not heartbeats are enabled.

public bool AddHeartbeatProperty(string heartbeatPropertyName, string heartbeatPropertyValue, bool isHealthy)

public bool AddHeartbeatProperty(string propertyName, bool overrideDefaultField, string propertyValue, bool isHealthy)

public void Dispose()

protected void Dispose(bool disposing)

public void Initialize(TelemetryConfiguration configuration)

public bool SetHeartbeatProperty(string heartbeatPropertyName, string heartbeatPropertyValue = null, bool? isHealthy = default)

public bool SetHeartbeatProperty(string propertyName, bool overrideDefaultField, string propertyValue = null, bool? isHealthy = default)