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

Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule

Use diagnostics telemetry module to report SDK internal problems to the portal and VS debug output window.
public string DiagnosticsInstrumentationKey { get; set; }

Gets or sets instrumentation key for diagnostics. Use to redirect SDK internal problems reporting to the separate instrumentation key.

public IList<string> ExcludedHeartbeatProperties { get; }

Gets a list of property names that are not to be sent with the heartbeats. null/empty list means allow all default properties through. Default properties supplied by the Application Insights SDK: baseSdkTargetFramework, osType, processSessionId

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. The only default heartbeat property provide currently defined is named 'Base'.

public TimeSpan HeartbeatInterval { get; set; }

Gets or sets the delay interval between heartbeats. Setting this value will immediately reset the heartbeat timer. Note that there is a minimum interval MinimumHeartbeatInterval and if an attempt to make the interval less than this minimum value is detected, the interval rate will be set to the minimum. Also note, if the interval is set to any value less than the current channel flush rate, the heartbeat may not be emitted at expected times. (The heartbeat will still be sent, but after having been cached for a time first).

public bool IsHeartbeatEnabled { get; set; }

Gets or sets a value indicating whether or not the Heartbeat feature is disabled.

public string Severity { get; set; }

Gets or sets diagnostics Telemetry Module LogLevel configuration setting. Possible values LogAlways, Critical, Error, Warning, Informational and Verbose.

Initializes a new instance of the DiagnosticsTelemetryModule class.

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

Add a new Heartbeat property to the payload sent with each heartbeat. To update the value of the property you are adding to the heartbeat, SetHeartbeatProperty. Note that you cannot add a HeartbeatProperty with a name that already exists in the Heartbeat payload, including (but not limited to) the name of SDK-default items.

public void Dispose()

Disposes this object.

public void Initialize(TelemetryConfiguration configuration)

Initializes this telemetry module.

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

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) to the heartbeat payload, the value represented by that item can be updated using this method at any time.