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

ExceptionRecorder

public sealed delegate ExceptionRecorder : MulticastDelegate
Defines the callback to be used in ActivityListener to receive notifications when exceptions are added to the Activity.
public ExceptionRecorder(object object, IntPtr method)

public virtual IAsyncResult BeginInvoke(Activity activity, Exception exception, ref TagList tags, AsyncCallback callback, object object)

public virtual void EndInvoke(ref TagList tags, IAsyncResult result)

public virtual void Invoke(Activity activity, Exception exception, ref TagList tags)