.NET's ActivityListener sampling API

Distributed tracing can generate a lot of data, and sampling is the most established method to keep data volumes manageable. In .NET, the System.Diagnostics.ActivityListener class exposes two properties to control sampling: Sample , and SampleUsingParentId . How do these work? If you just switched browser tabs to check the documentation, I know why you’re back. There’s barely any useful…