24 writes to ShouldListenTo
Aspire.Cli.Tests (7)
Commands\AgentTelemetryCommandTests.cs (1)
403ShouldListenTo = source => source.Name == sourceName,
Telemetry\ActivityTagEnrichmentProcessorTests.cs (3)
23ShouldListenTo = s => s.Name == source.Name, 69ShouldListenTo = s => s.Name == source.Name, 110ShouldListenTo = s => s.Name == source.Name,
Telemetry\AspireCliTelemetryTests.cs (1)
663ShouldListenTo = source => source.Name == fixture.ReportedSourceName,
Telemetry\TelemetryConfigurationTests.cs (1)
387ShouldListenTo = source => source.Name == sourceName,
Telemetry\TelemetryFixture.cs (1)
65ShouldListenTo = source => source.Name == ReportedSourceName || source.Name == DiagnosticsSourceName,
Aspire.Dashboard.Components.Tests (1)
tests\Shared\DashboardTelemetryFixture.cs (1)
47ShouldListenTo = source => source.Name == ActivitySourceName,
Aspire.Dashboard.Tests (3)
Model\DashboardCommandExecutorTests.cs (1)
83ShouldListenTo = source => source.Name == fixture.ActivitySourceName,
Model\SqliteResourceRepositoryTests.cs (1)
1005ShouldListenTo = source => source.Name == TracingSqliteConnection.ActivitySourceName,
tests\Shared\DashboardTelemetryFixture.cs (1)
47ShouldListenTo = source => source.Name == ActivitySourceName,
Aspire.Hosting.Native.Core.AotSmoke (1)
tests\Aspire.Hosting.Native.Core.Tests\TestServices\DiagnosticCapture.cs (1)
25ShouldListenTo = source => source.Name == NativeDiagnostics.SourceName || additionalSources.Contains(source.Name, StringComparer.Ordinal),
Aspire.Hosting.Native.Core.Tests (1)
TestServices\DiagnosticCapture.cs (1)
25ShouldListenTo = source => source.Name == NativeDiagnostics.SourceName || additionalSources.Contains(source.Name, StringComparer.Ordinal),
Aspire.Hosting.RemoteHost.Tests (1)
RemoteHostProfilingTelemetryTests.cs (1)
188ShouldListenTo = source => ReferenceEquals(source, telemetry.ActivitySource) || source.Name is "test.client" or "test.jsonrpc",
Aspire.Hosting.Tests (2)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
2208ShouldListenTo = source => source.Name is ProfilingTelemetry.ActivitySourceName or "test.client" or "test.jsonrpc",
DistributedApplicationTests.cs (1)
2457ShouldListenTo = source => source.Name == sourceName,
Aspire.TestUtilities (1)
ActivityListenerHelper.cs (1)
24ShouldListenTo = source => ReferenceEquals(source, targetSource),
Microsoft.DotNet.Cli.Utils (1)
Activities.cs (1)
35ShouldListenTo = source => source.Name == Source.Name || source.Name == PerformanceSource.Name,
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIChatClientTests.cs (1)
2099ShouldListenTo = source => source.Name == sourceName,
OpenAIResponseClientTests.cs (1)
7246ShouldListenTo = source => source.Name == sourceName,
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
1082ShouldListenTo = source => source == parentSource,
Microsoft.Extensions.Diagnostics (1)
Tracing\DefaultActivitySourceFactory.cs (1)
213_activityListener = new ActivityListener { ShouldListenTo = ShouldListenTo };
Stress.ApiService (1)
Program.cs (1)
479ShouldListenTo = _ => true,
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\DsesActivitySourceListener.cs (1)
121_activityListener.ShouldListenTo = (activitySource) =>
7 references to ShouldListenTo
System.Diagnostics.DiagnosticSource (7)
System\Diagnostics\ActivityListener.cs (3)
66/// Re-evaluates <see cref="ShouldListenTo"/> against every registered <see cref="ActivitySource"/>, attaching this 68/// <see cref="ShouldListenTo"/> or any state captured by its callback (for example, when configuration changes 73/// <exception cref="Exception">If <see cref="ShouldListenTo"/> throws while evaluating exactly one source, that
System\Diagnostics\ActivitySource.cs (4)
69Func<ActivitySource, bool>? shouldListenTo = listener.ShouldListenTo; 432var shouldListenTo = ((ActivityListener)obj).ShouldListenTo; 453/// <param name="listener">The <see cref="ActivityListener"/> instance whose configuration, in particular its <see cref="ActivityListener.ShouldListenTo"/> callback, determines which <see cref="ActivitySource"/> instances it should listen to.</param> 471listen = ls.ShouldListenTo?.Invoke(source) ?? false;