PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Diagnostic­Source Namespace / Diagnostic­Source­Collecting­Listener Class / Diagnostic­Source­Collecting­Listener Methods / Diagnostic­Source­Collecting­Listener.​Follow­Activity Method

DiagnosticSourceCollectingListener.FollowActivity Method

Follows a specific activity.

Namespace:  PostSharp.Patterns.Diagnostics.Adapters.DiagnosticSource
Assembly:  PostSharp.Patterns.Diagnostics.Adapters.DiagnosticSource (in PostSharp.Patterns.Diagnostics.Adapters.DiagnosticSource.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
public void FollowActivity(
	string activityName,
	IDiagnosticSourceActivityFilter filter = null
)

Parameters

activityName
Type: System.String
Name of the activity to follow.
filter (Optional)
Type: PostSharp.Patterns.Diagnostics.Adapters.DiagnosticSource.IDiagnosticSourceActivityFilter
Determines how a DiagnosticListener activity must be translated into a PostSharp Logging activity. This parameter is mandatory under .NET Framework because there is no way to automatically implement the TryGetCorrelationKey(Object, Object) method. It is optional under .NET Core.
See Also