25 instantiations of ActivityListener
Microsoft.AspNetCore.Hosting.Tests (5)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (6)
Microsoft.AspNetCore.SignalR.Client.Tests (5)
Microsoft.AspNetCore.SignalR.Tests (8)
System.Diagnostics.DiagnosticSource (1)
55 references to ActivityListener
Microsoft.AspNetCore.Hosting.Tests (5)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (6)
Microsoft.AspNetCore.SignalR.Client.Tests (5)
Microsoft.AspNetCore.SignalR.Tests (8)
System.Diagnostics.DiagnosticSource (31)
System\Diagnostics\ActivitySource.cs (20)
14private static readonly SynchronizedList<ActivityListener> s_allListeners = new SynchronizedList<ActivityListener>();
15private SynchronizedList<ActivityListener>? _listeners;
95SynchronizedList<ActivityListener>? listeners = _listeners;
196SynchronizedList<ActivityListener>? listeners = _listeners;
220listeners.EnumWithFunc((ActivityListener listener, ref ActivityCreationOptions<string> data, ref ActivitySamplingResult result, ref ActivityCreationOptions<ActivityContext> dataWithContext) => {
290listeners.EnumWithFunc((ActivityListener listener, ref ActivityCreationOptions<ActivityContext> data, ref ActivitySamplingResult result, ref ActivityCreationOptions<ActivityContext> unused) => {
335/// <param name="listener"> The <see cref="ActivityListener"/> object to use for listening to the <see cref="Activity"/> events.</param>
336public static void AddActivityListener(ActivityListener listener)
346var shouldListenTo = ((ActivityListener)obj).ShouldListenTo;
349source.AddListener((ActivityListener)obj);
357internal void AddListener(ActivityListener listener)
361Interlocked.CompareExchange(ref _listeners, new SynchronizedList<ActivityListener>(), null);
367internal static void DetachListener(ActivityListener listener)
370s_activeSources.EnumWithAction((source, obj) => source._listeners?.Remove((ActivityListener) obj), listener);
378SynchronizedList<ActivityListener>? listeners = _listeners;
390SynchronizedList<ActivityListener>? listeners = _listeners;
402SynchronizedList<ActivityListener>? listeners = _listeners;
504if (typeof(T) != typeof(ActivityListener))
511(item as ActivityListener)!.ExceptionRecorder?.Invoke(activity, exception, ref tags);