Share via


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.

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

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

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.

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);
public static Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.UserTaskEvent> StartUserTask (this Microsoft.VisualStudio.Telemetry.TelemetrySession session, string eventName, Microsoft.VisualStudio.Telemetry.TelemetryScopeSettings settings);
static member StartUserTask : Microsoft.VisualStudio.Telemetry.TelemetrySession * string * Microsoft.VisualStudio.Telemetry.TelemetryScopeSettings -> Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.UserTaskEvent>
<Extension()>
Public Function StartUserTask (session As TelemetrySession, eventName As String, settings As TelemetryScopeSettings) As TelemetryScope(Of UserTaskEvent)

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

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.

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);
public static Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.UserTaskEvent> StartUserTask (this Microsoft.VisualStudio.Telemetry.TelemetrySession session, string eventName, Microsoft.VisualStudio.Telemetry.TelemetrySeverity severity);
static member StartUserTask : Microsoft.VisualStudio.Telemetry.TelemetrySession * string * Microsoft.VisualStudio.Telemetry.TelemetrySeverity -> Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.UserTaskEvent>
<Extension()>
Public Function StartUserTask (session As TelemetrySession, eventName As String, severity As TelemetrySeverity) As TelemetryScope(Of UserTaskEvent)

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

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.

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);
public static Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.UserTaskEvent> StartUserTask (this Microsoft.VisualStudio.Telemetry.TelemetrySession session, string eventName, Microsoft.VisualStudio.Telemetry.TelemetrySeverity severity, System.Collections.Generic.IDictionary<string,object> startEventProperties);
static member StartUserTask : Microsoft.VisualStudio.Telemetry.TelemetrySession * string * Microsoft.VisualStudio.Telemetry.TelemetrySeverity * System.Collections.Generic.IDictionary<string, obj> -> Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.UserTaskEvent>
<Extension()>
Public Function StartUserTask (session As TelemetrySession, eventName As String, severity As TelemetrySeverity, startEventProperties As IDictionary(Of String, Object)) As TelemetryScope(Of UserTaskEvent)

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

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.

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);
public static Microsoft.VisualStudio.Telemetry.TelemetryScope<Microsoft.VisualStudio.Telemetry.UserTaskEvent> StartUserTask (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 StartUserTask : 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.UserTaskEvent>
<Extension()>
Public Function StartUserTask (session As TelemetrySession, eventName As String, severity As TelemetrySeverity, startEventProperties As IDictionary(Of String, Object), correlations As TelemetryEventCorrelation()) As TelemetryScope(Of UserTaskEvent)

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