DiagnosticsTelemetryModule.SetHeartbeatProperty Method

Definition

Set an updated value into an existing property of the heartbeat. The propertyName must be non-null and non-empty and at least one of the propertyValue and isHealthy parameters must be non-null.

After the new HeartbeatProperty has been added (AddHeartbeatProperty(String, String, Boolean)) to the heartbeat payload, the value represented by that item can be updated using this method at any time.

public bool SetHeartbeatProperty (string propertyName, string propertyValue = default, bool? isHealthy = default);
abstract member SetHeartbeatProperty : string * string * Nullable<bool> -> bool
override this.SetHeartbeatProperty : string * string * Nullable<bool> -> bool
Public Function SetHeartbeatProperty (propertyName As String, Optional propertyValue As String = Nothing, Optional isHealthy As Nullable(Of Boolean) = Nothing) As Boolean

Parameters

propertyName
String

Name of the heartbeat payload item property to set the value and/or its health status.

propertyValue
String

Value of the heartbeat payload item. If this is null, the current value in the item is left unchanged.

isHealthy
Nullable<Boolean>

Health status of the heartbeat payload item. If this is set to null the health status is left unchanged.

Returns

True if the payload provider was added, false if it hasn't been added yet (AddHeartbeatProperty(String, String, Boolean)).

Implements

Applies to