Activity.Source Property

Definition

Gets the activity source associated with this activity.

C#
public System.Diagnostics.ActivitySource Source { get; }

Property Value

Remarks

All activities created from public constructors will have a singleton source where the source name is an empty string. Otherwise, the source will hold the object that created the activity through StartActivity.

Applies to

Product Versions
.NET 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)