<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.2" />

ActivitySamplingResult

Used by ActivityListener to indicate what amount of data should be collected for this Activity Requesting more data causes greater performance overhead to collect it.
AllData = 2

The activity object should be populated with all the propagation info and also all other properties such as Links, Tags, and Events. Activity.IsAllDataRequested will return true.

The activity object should be populated the same as the AllData case and additionally Activity.IsRecorded is set true. For activities using W3C trace ids this sets a flag bit in the ID that will be propagated downstream requesting that trace is recorded everywhere.

None = 0

The Activity object doesn't need to be created

The Activity object needs to be created. It will have Name, Source, Id and Baggage. Other properties are unnecessary and will be ignored by this listener.