OperationEvent(String, TelemetryResult, String) Constructor
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.
Initializes a new instance of the OperationEvent class.
public OperationEvent (string eventName, Microsoft.VisualStudio.Telemetry.TelemetryResult result, string resultSummary = default);
new Microsoft.VisualStudio.Telemetry.OperationEvent : string * Microsoft.VisualStudio.Telemetry.TelemetryResult * string -> Microsoft.VisualStudio.Telemetry.OperationEvent
Public Sub New (eventName As String, result As TelemetryResult, Optional resultSummary As String = 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;
- result
- TelemetryResult
the result of this user task. If the result is Failure, recommend correlate with FaultEvent.
- resultSummary
- String
a summary description for the result. it provides a little bit more details about the result without digging into it. when correlated with fault event, use this parameter to summarize the additional information stored in FaultEvent. E.g., "sign in failed because of wrong credential", "user cancelled azure deployment". Default value is null.
Examples
This example shows how to create and post OperationEvent.
OperationEvent operation = new OperationEvent("vs/debugger/loadingAssembly", Result.Success);
TelemetryService.DefaultSession.PostEvent(operation);