Source. Start Activity(Activity, Object) Method
Starts an Activity and writes a start event.
public: System::Diagnostics::Activity ^ StartActivity(System::Diagnostics::Activity ^ activity, System::Object ^ args);
public System.Diagnostics.Activity StartActivity (System.Diagnostics.Activity activity, object args);
member this.StartActivity : System.Diagnostics.Activity * obj -> System.Diagnostics.Activity
Public Function StartActivity (activity As Activity, args As Object) As Activity
An object that represent the value being passed as a payload for the event.
The started activity for convenient chaining.
This method starts the given Activity, maintains a global Activity.Current and Activity.Parent activity for the given Activity, and notifies consumers that a new Activity was started. Consumers can access Activity.Current to add context and/or augment telemetry.
Producers may pass additional details to the consumer in the payload.