<PackageReference Include="Microsoft.Extensions.Diagnostics.Abstractions" Version="11.0.0-preview.7.26381.103" />

Microsoft.Extensions.Diagnostics.Tracing.TracingRule

public class TracingRule
Contains a set of parameters used to determine which activities are enabled for which listeners. An unspecified SourceName matches all activity sources, an unspecified OperationName matches all activities within the matching sources, and an unspecified ListenerName matches all listeners.
public bool Enable { get; }

Gets a value that indicates whether matched activities are enabled for this listener.

public string ListenerName { get; }

Gets the Name, an exact match.

public string OperationName { get; }

Gets the OperationName, an exact match.

public ActivitySourceScopes Scopes { get; }

Gets the ActivitySourceScopes.

public string SourceName { get; }

Gets the Name, either an exact match, the longest prefix match, or a wildcard pattern using a single *.

public TracingRule(string sourceName, string operationName, string listenerName, ActivitySourceScopes scopes, bool enable)

Initializes a new instance of the TracingRule class.