18 references to SubscriptionType
Aspire.Dashboard (13)
Components\Pages\Metrics.razor.cs (1)
274_metricsSubscription = TelemetryRepository.OnNewMetrics(selectedApplicationKey, SubscriptionType.Read, async () =>
Components\Pages\Resources.razor.cs (1)
174_logsSubscription = TelemetryRepository.OnNewLogs(null, SubscriptionType.Other, async () =>
Components\Pages\StructuredLogs.razor.cs (1)
237_logsSubscription = TelemetryRepository.OnNewLogs(PageViewModel.SelectedApplication.Id?.GetApplicationKey(), SubscriptionType.Read, async () =>
Components\Pages\TraceDetail.razor.cs (1)
172_tracesSubscription = TelemetryRepository.OnNewTraces(_trace.FirstSpan.Source.ApplicationKey, SubscriptionType.Read, () => InvokeAsync(async () =>
Components\Pages\Traces.razor.cs (1)
205_tracesSubscription = TelemetryRepository.OnNewTraces(selectedApplicationKey, SubscriptionType.Read, async () =>
Otlp\Storage\Subscription.cs (2)
27public SubscriptionType SubscriptionType { get; } 30public Subscription(string name, ApplicationKey? applicationKey, SubscriptionType subscriptionType, Func<Task> callback, Action unsubscribe, ExecutionContext? executionContext, TelemetryRepository telemetryRepository)
Otlp\Storage\TelemetryRepository.cs (6)
220return AddSubscription(nameof(OnNewApplications), null, SubscriptionType.Read, callback, _applicationSubscriptions); 223public Subscription OnNewLogs(ApplicationKey? applicationKey, SubscriptionType subscriptionType, Func<Task> callback) 228public Subscription OnNewMetrics(ApplicationKey? applicationKey, SubscriptionType subscriptionType, Func<Task> callback) 233public Subscription OnNewTraces(ApplicationKey? applicationKey, SubscriptionType subscriptionType, Func<Task> callback) 238private Subscription AddSubscription(string name, ApplicationKey? applicationKey, SubscriptionType subscriptionType, Func<Task> callback, List<Subscription> subscriptions) 354if (!_logSubscriptions.Any(s => s.SubscriptionType == SubscriptionType.Read && (s.ApplicationKey == applicationView.ApplicationKey || s.ApplicationKey == null)))
Aspire.Dashboard.Tests (5)
TelemetryRepositoryTests\LogTests.cs (5)
277using var subscription = repository.OnNewLogs(applicationKey: null, SubscriptionType.Read, () => Task.CompletedTask); 329using var subscription = repository.OnNewLogs(applicationKey: new ApplicationKey("TestService", "1"), SubscriptionType.Read, () => Task.CompletedTask); 382using var subscription = repository.OnNewLogs(applicationKey: null, SubscriptionType.Other, () => Task.CompletedTask); 491repository.OnNewLogs(applications[0].ApplicationKey, SubscriptionType.Read, () => 714var subscription = repository.OnNewLogs(applicationKey: null, SubscriptionType.Read, async () =>