TelemetrySessionExtensions.StartUserTask Method

Definition

Overloads

StartUserTask(TelemetrySession, String)

Start tracking user task by posting a UserTaskEvent at the beginning of user task work, and then return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another UserTaskEvent 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.

StartUserTask(TelemetrySession, String, TelemetryScopeSettings)

Start tracking user task by posting a UserTaskEvent with specified properties at the beginning of user task work, and then return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another UserTaskEvent 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.

StartUserTask(TelemetrySession, String, TelemetrySeverity)

Start tracking user task by posting a UserTaskEvent at the beginning of user task work, and then return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another UserTaskEvent 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.

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

Start tracking user task by posting a UserTaskEvent with specified properties at the beginning of user task work, and then return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another UserTaskEvent 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.

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

Start tracking user task by posting a UserTaskEvent with specified properties at the beginning of user task work, and then return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another UserTaskEvent 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.

StartUserTask(TelemetrySession, String)

Start tracking user task by posting a UserTaskEvent at the beginning of user task work, and then return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another UserTaskEvent 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::UserTaskEvent ^> ^ StartUserTask(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 i Visual Studio SDK 2019
Proizvod Verzije
Visual Studio SDK 2019, 2022

StartUserTask(TelemetrySession, String, TelemetryScopeSettings)

Start tracking user task by posting a UserTaskEvent with specified properties at the beginning of user task work, and then return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another UserTaskEvent 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::UserTaskEvent ^> ^ StartUserTask(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 i Visual Studio SDK 2019
Proizvod Verzije
Visual Studio SDK 2019, 2022

StartUserTask(TelemetrySession, String, TelemetrySeverity)

Start tracking user task by posting a UserTaskEvent at the beginning of user task work, and then return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another UserTaskEvent 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::UserTaskEvent ^> ^ StartUserTask(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 i Visual Studio SDK 2019
Proizvod Verzije
Visual Studio SDK 2019, 2022

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

Start tracking user task by posting a UserTaskEvent with specified properties at the beginning of user task work, and then return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another UserTaskEvent 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::UserTaskEvent ^> ^ StartUserTask(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 i Visual Studio SDK 2019
Proizvod Verzije
Visual Studio SDK 2019, 2022

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

Start tracking user task by posting a UserTaskEvent with specified properties at the beginning of user task work, and then return a TelemetryScope<T> object. When the user task finishes, call method End(TelemetryResult, String) to post another UserTaskEvent 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::UserTaskEvent ^> ^ StartUserTask(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 i Visual Studio SDK 2019
Proizvod Verzije
Visual Studio SDK 2019, 2022