ITelemetryClient.IsEnabled Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
IsEnabled() |
Checks to see if telemetry is enabled all up. |
IsEnabled(String) |
Checks to see if telemetry is enabled for the named event. |
IsEnabled()
Checks to see if telemetry is enabled all up.
public bool IsEnabled ();
abstract member IsEnabled : unit -> bool
Public Function IsEnabled () As Boolean
Returns
Returns true
if telemetry should be sent; false
otherwise.
Remarks
This check should be used to gate any resource intensive operations to generate telemetry as well.
Applies to
IsEnabled(String)
Checks to see if telemetry is enabled for the named event.
public bool IsEnabled (string eventName);
abstract member IsEnabled : string -> bool
Public Function IsEnabled (eventName As String) As Boolean
Parameters
- eventName
- String
Name of the event to check.
Returns
Returns true
if telemetry should be sent for eventName
;
false
otherwise.
Remarks
This check should be used to gate any resource intensive operations to generate telemetry as well.