次の方法で共有


FaultEvent Constructors

Definition

Overloads

FaultEvent(String, String, Exception, Func<IFaultUtility,Int32>)

Create an uncategorized severity FaultEvent. The pattern:

  1. FEvent = new FaultEvent(...)
  2. tsession.PostEvent(FEvent) //posts the event to Watson and AI External users should call the TelemetrySession extension methods "PostFault" (which calls PostEvent) It becomes more useful when correlated with UserTaskEvent or OperationEvent which may have led to the fault occurence.
FaultEvent(String, String, FaultSeverity, Exception, Func<IFaultUtility,Int32>)

Create a FaultEvent. The pattern:

  1. FEvent = new FaultEvent(...)
  2. tsession.PostEvent(FEvent) //posts the event to Watson and AI External users should call the TelemetrySession extension methods "PostFault" (which calls PostEvent) It becomes more useful when correlated with UserTaskEvent or OperationEvent which may have led to the fault occurence.

FaultEvent(String, String, Exception, Func<IFaultUtility,Int32>)

Create an uncategorized severity FaultEvent. The pattern:

  1. FEvent = new FaultEvent(...)
  2. tsession.PostEvent(FEvent) //posts the event to Watson and AI External users should call the TelemetrySession extension methods "PostFault" (which calls PostEvent) It becomes more useful when correlated with UserTaskEvent or OperationEvent which may have led to the fault occurence.
public FaultEvent (string eventName, string description, Exception exceptionObject = default, Func<Microsoft.VisualStudio.Telemetry.IFaultUtility,int> gatherEventDetails = default);
new Microsoft.VisualStudio.Telemetry.FaultEvent : string * string * Exception * Func<Microsoft.VisualStudio.Telemetry.IFaultUtility, int> -> Microsoft.VisualStudio.Telemetry.FaultEvent
Public Sub New (eventName As String, description As String, Optional exceptionObject As Exception = Nothing, Optional gatherEventDetails As Func(Of IFaultUtility, Integer) = Nothing)

Parameters

eventName
String

An event name following data model schema. It requires that event name is a unique, not null or empty string. It consists of 3 parts and must follows pattern [product]/[featureName]/[entityName]. FeatureName could be a one-level feature or feature hierarchy delimited by "/". For examples, vs/platform/opensolution; vs/platform/editor/lightbulb/fixerror;

description
String
exceptionObject
Exception
gatherEventDetails
Func<IFaultUtility,Int32>

This delegate is called to gather expensive details (like jscript call stacks) only when not sampled. The callback parameter can be cast to to a FaultEvent or (IVsFaultEvent in native) which inherits from TelemetryEvent (IVsTelemetryEvent in native) IFaultUtility

Applies to

FaultEvent(String, String, FaultSeverity, Exception, Func<IFaultUtility,Int32>)

Create a FaultEvent. The pattern:

  1. FEvent = new FaultEvent(...)
  2. tsession.PostEvent(FEvent) //posts the event to Watson and AI External users should call the TelemetrySession extension methods "PostFault" (which calls PostEvent) It becomes more useful when correlated with UserTaskEvent or OperationEvent which may have led to the fault occurence.
public FaultEvent (string eventName, string description, Microsoft.VisualStudio.Telemetry.FaultSeverity faultSeverity, Exception exceptionObject = default, Func<Microsoft.VisualStudio.Telemetry.IFaultUtility,int> gatherEventDetails = default);
new Microsoft.VisualStudio.Telemetry.FaultEvent : string * string * Microsoft.VisualStudio.Telemetry.FaultSeverity * Exception * Func<Microsoft.VisualStudio.Telemetry.IFaultUtility, int> -> Microsoft.VisualStudio.Telemetry.FaultEvent
Public Sub New (eventName As String, description As String, faultSeverity As FaultSeverity, Optional exceptionObject As Exception = Nothing, Optional gatherEventDetails As Func(Of IFaultUtility, Integer) = Nothing)

Parameters

eventName
String

An event name following data model schema. It requires that event name is a unique, not null or empty string. It consists of 3 parts and must follows pattern [product]/[featureName]/[entityName]. FeatureName could be a one-level feature or feature hierarchy delimited by "/". For examples, vs/platform/opensolution; vs/platform/editor/lightbulb/fixerror;

description
String
faultSeverity
FaultSeverity

The severity of the fault, used to identify actionable or important faults in divisional tools and reporting.

exceptionObject
Exception
gatherEventDetails
Func<IFaultUtility,Int32>

This delegate is called to gather expensive details (like jscript call stacks) only when not sampled. The callback parameter can be cast to to a FaultEvent or (IVsFaultEvent in native) which inherits from TelemetryEvent (IVsTelemetryEvent in native) IFaultUtility

Applies to