Share via


OperationEvent Class

Definition

A class that stores information for operation data model event. An operation performs some work in application and comes with result (e.g., Success, Failure). If the operation is invoked by user directly, please use UserTaskEvent or related methods. A few examples of operations are, license check, package load, windows layout loading.

For long-time running or async operation, in order to understand what else happened during the time or track if it partially completes because of an error, use method StartOperation(TelemetrySession, String) which tracks both start and end points.

public ref class OperationEvent : Microsoft::VisualStudio::Telemetry::TelemetryEvent
public class OperationEvent : Microsoft.VisualStudio.Telemetry.TelemetryEvent
type OperationEvent = class
    inherit TelemetryEvent
Public Class OperationEvent
Inherits TelemetryEvent
Inheritance
OperationEvent
Derived

Constructors

OperationEvent(String, TelemetryResult, String)

Initializes a new instance of the OperationEvent class.

Properties

Correlation

Gets correlation of this event. It represents this event when correlated with other events.

(Inherited from TelemetryEvent)
DataSource

Gets data source.

(Inherited from TelemetryEvent)
Duration

Gets duration of the operation if the stage type is End. Return null for other stage types.

EndTime

Gets end time (in ticks) of current operation which stage type is End. Return null for other stage types.

EntityName

Gets entity name

EventSchemaVersion

Gets schema version for this event.

(Inherited from TelemetryEvent)
EventType

Gets event type for this event

(Inherited from TelemetryEvent)
FeatureName

Gets feature name

HasProperties

Gets a value indicating whether properties already created.

(Inherited from TelemetryEvent)
IsOptOutFriendly

Gets or sets a value indicating whether event is friendly for the optOut session. By default it is false. If it is OptOut friendly it passes through with the event specific properties only. This behaviour can be changed by manifest rules.

(Inherited from TelemetryEvent)
Name

Gets current event name

(Inherited from TelemetryEvent)
ProductName

Gets product name

Properties

Gets a dictionary of event properties. Properties are dimensions that aggregated data can be sliced by. The key is a property name that is unique, not null and not empty. The value is any object that represents a property value. Telemetry channels must use value.ToString(CultureInfo.InvariantCulture) to send the value to a server as a string.

(Inherited from TelemetryEvent)
Result

Gets result from this operation.

ResultSummary

Gets result summary from this operation.

Severity

Gets or sets a severity level of the event. The level is used for event consumer (e.g., ETW provider, backend reporting) to organize data easier.

(Inherited from TelemetryEvent)
SharedPropertyBags

Gets shared property bags

(Inherited from TelemetryEvent)
StageType

Gets stage type from this operation.

StartEndPairId

Gets pair id for start-end operation events. It is the same value as CorrelationId. return null for atomic operation event.

StartTime

Gets start time (in ticks) of current operation which stage type is End. Return null for other stage types.

Methods

Correlate(TelemetryEventCorrelation, String)

Correlate this event with other event via TelemetryEventCorrelation with description information.

Correlate(TelemetryEventCorrelation[])

Correlate this event with other events via TelemetryEventCorrelation.

(Inherited from TelemetryEvent)
CorrelateWithDescription(TelemetryEventCorrelation, String)

Correlate this event with other event via TelemetryEventCorrelation with description information.

(Inherited from TelemetryEvent)
GetDefaultEventProperties(Int64, Int64, String)

Returns default properties that should be on each TelemetryEvent

(Inherited from TelemetryEvent)
ToString()

ToString to make debugging easier: show in debug watch window

(Inherited from TelemetryEvent)

Applies to