ActivitySource.StartActivity Method

Definition

Overloads

StartActivity(String, ActivityKind)
StartActivity(String, ActivityKind, ActivityContext, IEnumerable<KeyValuePair<String,String>>, IEnumerable<ActivityLink>, DateTimeOffset)
StartActivity(String, ActivityKind, String, IEnumerable<KeyValuePair<String,String>>, IEnumerable<ActivityLink>, DateTimeOffset)

StartActivity(String, ActivityKind)

public System.Diagnostics.Activity? StartActivity (string name, System.Diagnostics.ActivityKind kind = System.Diagnostics.ActivityKind.Internal);
member this.StartActivity : string * System.Diagnostics.ActivityKind -> System.Diagnostics.Activity
Public Function StartActivity (name As String, Optional kind As ActivityKind = System.Diagnostics.ActivityKind.Internal) As Activity

Parameters

name
String

Returns

Activity
public System.Diagnostics.Activity StartActivity (string? name, System.Diagnostics.ActivityKind kind, System.Diagnostics.ActivityContext parentContext, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>>? tags = default, System.Collections.Generic.IEnumerable<System.Diagnostics.ActivityLink> links = default, DateTimeOffset startTime = default);
member this.StartActivity : string * System.Diagnostics.ActivityKind * System.Diagnostics.ActivityContext * seq<System.Collections.Generic.KeyValuePair<string, string>> * seq<System.Diagnostics.ActivityLink> * DateTimeOffset -> System.Diagnostics.Activity
Public Function StartActivity (name As String, kind As ActivityKind, parentContext As ActivityContext, Optional tags As IEnumerable(Of KeyValuePair(Of String, String)) = Nothing, Optional links As IEnumerable(Of ActivityLink) = Nothing, Optional startTime As DateTimeOffset = Nothing) As Activity

Parameters

name
String
parentContext
ActivityContext
startTime
DateTimeOffset

Returns

Activity
public System.Diagnostics.Activity? StartActivity (string name, System.Diagnostics.ActivityKind kind, string parentId, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string>>? tags = default, System.Collections.Generic.IEnumerable<System.Diagnostics.ActivityLink>? links = default, DateTimeOffset startTime = default);
member this.StartActivity : string * System.Diagnostics.ActivityKind * string * seq<System.Collections.Generic.KeyValuePair<string, string>> * seq<System.Diagnostics.ActivityLink> * DateTimeOffset -> System.Diagnostics.Activity
Public Function StartActivity (name As String, kind As ActivityKind, parentId As String, Optional tags As IEnumerable(Of KeyValuePair(Of String, String)) = Nothing, Optional links As IEnumerable(Of ActivityLink) = Nothing, Optional startTime As DateTimeOffset = Nothing) As Activity

Parameters

name
String
parentId
String
startTime
DateTimeOffset

Returns

Activity

Applies to