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.

C++
public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::VisualStudio::Telemetry::TelemetryScope<Microsoft::VisualStudio::Telemetry::OperationEvent ^> ^ StartOperation(Microsoft::VisualStudio::Telemetry::TelemetrySession ^ session, System::String ^ eventName);

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

Visual Studio SDK 2022 および Visual Studio SDK 2019
製品 バージョン
Visual Studio SDK 2019, 2022

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.

C++
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);

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

Visual Studio SDK 2022 および Visual Studio SDK 2019
製品 バージョン
Visual Studio SDK 2019, 2022

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.

C++
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);

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

Visual Studio SDK 2022 および Visual Studio SDK 2019
製品 バージョン
Visual Studio SDK 2019, 2022

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.

C++
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);

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

Visual Studio SDK 2022 および Visual Studio SDK 2019
製品 バージョン
Visual Studio SDK 2019, 2022

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.

C++
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);

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

Visual Studio SDK 2022 および Visual Studio SDK 2019
製品 バージョン
Visual Studio SDK 2019, 2022