Share via


DiagnosticsTelemetryModule Class

Definition

Use diagnostics telemetry module to report SDK internal problems to the portal and VS debug output window.

public sealed class DiagnosticsTelemetryModule : IDisposable, Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.IHeartbeatPropertyManager, Microsoft.ApplicationInsights.Extensibility.ITelemetryModule
type DiagnosticsTelemetryModule = class
    interface ITelemetryModule
    interface IHeartbeatPropertyManager
    interface IDisposable
Public NotInheritable Class DiagnosticsTelemetryModule
Implements IDisposable, IHeartbeatPropertyManager, ITelemetryModule
Inheritance
DiagnosticsTelemetryModule
Implements

Constructors

DiagnosticsTelemetryModule()

Initializes a new instance of the DiagnosticsTelemetryModule class.

Properties

DiagnosticsInstrumentationKey

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

ExcludedHeartbeatProperties

Gets a list of property names that are not to be sent with the heartbeats. null/empty list means allow all default properties through.

ExcludedHeartbeatPropertyProviders

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'.

HeartbeatInterval

Gets or sets the delay interval between heartbeats. Setting this value will immediately reset the heartbeat timer.

IsHeartbeatEnabled

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

Severity

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

Methods

AddHeartbeatProperty(String, String, Boolean)

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(String, String, Nullable<Boolean>).

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.

Dispose()

Disposes this object.

Finalize()

Finalizes an instance of the DiagnosticsTelemetryModule class.

Initialize(TelemetryConfiguration)

Initializes this telemetry module.

SetHeartbeatProperty(String, String, Nullable<Boolean>)

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.

Applies to