DiagnosticSource.StopActivity(Activity, Object) DiagnosticSource.StopActivity(Activity, Object) DiagnosticSource.StopActivity(Activity, Object) Method

Definition

Stops the given Activity, maintains the global Current activity, and notifies consumers that the Activity was stopped.

public:
 void StopActivity(System::Diagnostics::Activity ^ activity, System::Object ^ args);
public void StopActivity (System.Diagnostics.Activity activity, object args);
member this.StopActivity : System.Diagnostics.Activity * obj -> unit

Parameters

activity
Activity Activity Activity

The activity to be stopped.

args
Object Object Object

An object that represents the value passed as a payload for the event.

Remarks

Producers may pass additional details to the consumer in the payload.

Consumers can access Activity.Current to add context and/or augment telemetry.

Applies to