Freigeben über


TelemetrySessionExtensions.StartOperation Method

Definition

Overloads

StartOperation(TelemetrySession, String)

Start tracking operation by posting a OperationEvent at the begining of operation work, and return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another OperationEvent for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name.

StartOperation(TelemetrySession, String, TelemetryScopeSettings)

Start tracking operation by posting a OperationEvent with specified properties at the begining of operation work, and return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another OperationEvent for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name.

StartOperation(TelemetrySession, String, TelemetrySeverity)

Start tracking operation by posting a OperationEvent at the begining of operation work, and return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another OperationEvent for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name.

StartOperation(TelemetrySession, String, TelemetrySeverity, IDictionary<String,Object>)

Start tracking operation by posting a OperationEvent with specified properties at the begining of operation work, and return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another OperationEvent for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name.

StartOperation(TelemetrySession, String, TelemetrySeverity, IDictionary<String,Object>, TelemetryEventCorrelation[])

Start tracking operation by posting a OperationEvent with specified properties at the begining of operation work, and return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another OperationEvent for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name.

StartOperation(TelemetrySession, String)

Start tracking operation by posting a OperationEvent at the begining of operation work, and return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another OperationEvent for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::VisualStudio::Telemetry::TelemetryScope<Microsoft::VisualStudio::Telemetry::OperationEvent ^> ^ StartOperation(Microsoft::VisualStudio::Telemetry::TelemetrySession ^ session, System::String ^ eventName);
public static Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.OperationEvent> StartOperation (this Microsoft.VisualStudio.Telemetry.TelemetrySession session, string eventName);
static member StartOperation : Microsoft.VisualStudio.Telemetry.TelemetrySession * string -> Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.OperationEvent>
<Extension()>
Public Function StartOperation (session As TelemetrySession, eventName As String) As TelemetryScope(Of OperationEvent)

Parameters

session
TelemetrySession

Telemetry Session

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;

Returns

TelemetryScope<T> instance.

Applies to

StartOperation(TelemetrySession, String, TelemetryScopeSettings)

Start tracking operation by posting a OperationEvent with specified properties at the begining of operation work, and return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another OperationEvent for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::VisualStudio::Telemetry::TelemetryScope<Microsoft::VisualStudio::Telemetry::OperationEvent ^> ^ StartOperation(Microsoft::VisualStudio::Telemetry::TelemetrySession ^ session, System::String ^ eventName, Microsoft::VisualStudio::Telemetry::TelemetryScopeSettings ^ settings);
public static Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.OperationEvent> StartOperation (this Microsoft.VisualStudio.Telemetry.TelemetrySession session, string eventName, Microsoft.VisualStudio.Telemetry.TelemetryScopeSettings settings);
static member StartOperation : Microsoft.VisualStudio.Telemetry.TelemetrySession * string * Microsoft.VisualStudio.Telemetry.TelemetryScopeSettings -> Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.OperationEvent>
<Extension()>
Public Function StartOperation (session As TelemetrySession, eventName As String, settings As TelemetryScopeSettings) As TelemetryScope(Of OperationEvent)

Parameters

session
TelemetrySession

Telemetry Session

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;

settings
TelemetryScopeSettings

A TelemetryScopeSettings object to control the TelemetryScope behavior.

Returns

TelemetryScope<T> instance.

Applies to

StartOperation(TelemetrySession, String, TelemetrySeverity)

Start tracking operation by posting a OperationEvent at the begining of operation work, and return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another OperationEvent for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::VisualStudio::Telemetry::TelemetryScope<Microsoft::VisualStudio::Telemetry::OperationEvent ^> ^ StartOperation(Microsoft::VisualStudio::Telemetry::TelemetrySession ^ session, System::String ^ eventName, Microsoft::VisualStudio::Telemetry::TelemetrySeverity severity);
public static Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.OperationEvent> StartOperation (this Microsoft.VisualStudio.Telemetry.TelemetrySession session, string eventName, Microsoft.VisualStudio.Telemetry.TelemetrySeverity severity);
static member StartOperation : Microsoft.VisualStudio.Telemetry.TelemetrySession * string * Microsoft.VisualStudio.Telemetry.TelemetrySeverity -> Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.OperationEvent>
<Extension()>
Public Function StartOperation (session As TelemetrySession, eventName As String, severity As TelemetrySeverity) As TelemetryScope(Of OperationEvent)

Parameters

session
TelemetrySession

Telemetry Session

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;

severity
TelemetrySeverity

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

Returns

TelemetryScope<T> instance.

Applies to

StartOperation(TelemetrySession, String, TelemetrySeverity, IDictionary<String,Object>)

Start tracking operation by posting a OperationEvent with specified properties at the begining of operation work, and return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another OperationEvent for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::VisualStudio::Telemetry::TelemetryScope<Microsoft::VisualStudio::Telemetry::OperationEvent ^> ^ StartOperation(Microsoft::VisualStudio::Telemetry::TelemetrySession ^ session, System::String ^ eventName, Microsoft::VisualStudio::Telemetry::TelemetrySeverity severity, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ startEventProperties);
public static Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.OperationEvent> StartOperation (this Microsoft.VisualStudio.Telemetry.TelemetrySession session, string eventName, Microsoft.VisualStudio.Telemetry.TelemetrySeverity severity, System.Collections.Generic.IDictionary<string,object> startEventProperties);
static member StartOperation : Microsoft.VisualStudio.Telemetry.TelemetrySession * string * Microsoft.VisualStudio.Telemetry.TelemetrySeverity * System.Collections.Generic.IDictionary<string, obj> -> Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.OperationEvent>
<Extension()>
Public Function StartOperation (session As TelemetrySession, eventName As String, severity As TelemetrySeverity, startEventProperties As IDictionary(Of String, Object)) As TelemetryScope(Of OperationEvent)

Parameters

session
TelemetrySession

Telemetry Session

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;

severity
TelemetrySeverity

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

startEventProperties
IDictionary<String,Object>

Event properties for the start event of this scope. They are also copied to end event.

Returns

TelemetryScope<T> instance.

Applies to

StartOperation(TelemetrySession, String, TelemetrySeverity, IDictionary<String,Object>, TelemetryEventCorrelation[])

Start tracking operation by posting a OperationEvent with specified properties at the begining of operation work, and return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another OperationEvent for end point. Because the same event name is used by both start and end events, please don't use Start or End in event name.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::VisualStudio::Telemetry::TelemetryScope<Microsoft::VisualStudio::Telemetry::OperationEvent ^> ^ StartOperation(Microsoft::VisualStudio::Telemetry::TelemetrySession ^ session, System::String ^ eventName, Microsoft::VisualStudio::Telemetry::TelemetrySeverity severity, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ startEventProperties, cli::array <Microsoft::VisualStudio::Telemetry::TelemetryEventCorrelation> ^ correlations);
public static Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.OperationEvent> StartOperation (this Microsoft.VisualStudio.Telemetry.TelemetrySession session, string eventName, Microsoft.VisualStudio.Telemetry.TelemetrySeverity severity, System.Collections.Generic.IDictionary<string,object> startEventProperties, Microsoft.VisualStudio.Telemetry.TelemetryEventCorrelation[] correlations);
static member StartOperation : Microsoft.VisualStudio.Telemetry.TelemetrySession * string * Microsoft.VisualStudio.Telemetry.TelemetrySeverity * System.Collections.Generic.IDictionary<string, obj> * Microsoft.VisualStudio.Telemetry.TelemetryEventCorrelation[] -> Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.OperationEvent>
<Extension()>
Public Function StartOperation (session As TelemetrySession, eventName As String, severity As TelemetrySeverity, startEventProperties As IDictionary(Of String, Object), correlations As TelemetryEventCorrelation()) As TelemetryScope(Of OperationEvent)

Parameters

session
TelemetrySession

Telemetry Session

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;

severity
TelemetrySeverity

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

startEventProperties
IDictionary<String,Object>

Event properties for the start event of this scope. They are also copied to end event.

correlations
TelemetryEventCorrelation[]

Events with which this scope can correlate.

Returns

TelemetryScope<T> instance.

Applies to