2 instantiations of TelemetryRepository
Aspire.Dashboard.Components.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
252var repository = new TelemetryRepository(
Aspire.Dashboard.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
252var repository = new TelemetryRepository(
130 references to TelemetryRepository
Aspire.Dashboard (51)
Components\Controls\ResourceActions.razor.cs (2)
33public required TelemetryRepository TelemetryRepository { get; set; } 83var hasTelemetryApplication = TelemetryRepository.GetApplicationByCompositeName(Resource.Name) != null;
Components\Controls\TreeMetricSelector.razor.cs (1)
23public required TelemetryRepository TelemetryRepository { get; init; }
Components\Dialogs\FilterDialog.razor.cs (1)
27public required TelemetryRepository TelemetryRepository { get; init; }
Components\Dialogs\SettingsDialog.razor.cs (2)
25public required TelemetryRepository TelemetryRepository { get; init; } 84TelemetryRepository.ClearAllSignals();
Components\Pages\Resources.razor.cs (4)
35public required TelemetryRepository TelemetryRepository { get; init; } 161_applicationUnviewedErrorCounts = TelemetryRepository.GetApplicationUnviewedErrorLogsCount(); 168_logsSubscription = TelemetryRepository.OnNewLogs(null, SubscriptionType.Other, async () => 170var newApplicationUnviewedErrorCounts = TelemetryRepository.GetApplicationUnviewedErrorLogsCount();
Components\Pages\StructuredLogs.razor.cs (10)
53public required TelemetryRepository TelemetryRepository { get; init; } 113if (DashboardOptions.Value.TelemetryLimits.MaxLogCount == logs.TotalItemCount && !TelemetryRepository.HasDisplayedMaxLogLimitMessage) 123TelemetryRepository.HasDisplayedMaxLogLimitMessage = true; 131TelemetryRepository.MarkViewedErrorLogs(ViewModel.ApplicationKey); 186_applicationsSubscription = TelemetryRepository.OnNewApplications(() => InvokeAsync(() => 206_applications = TelemetryRepository.GetApplications(); 232_logsSubscription = TelemetryRepository.OnNewLogs(PageViewModel.SelectedApplication.Id?.GetApplicationKey(), SubscriptionType.Read, async () => 291PropertyKeys = TelemetryRepository.GetLogPropertyKeys(PageViewModel.SelectedApplication.Id?.GetApplicationKey()), 293GetFieldValues = TelemetryRepository.GetLogsFieldValues 430TelemetryRepository.ClearStructuredLogs(key);
Components\Pages\TraceDetail.razor.cs (5)
44public required TelemetryRepository TelemetryRepository { get; init; } 144_applications = TelemetryRepository.GetApplications(); 146_trace = (TraceId != null) ? TelemetryRepository.GetTrace(TraceId) : null; 171_tracesSubscription = TelemetryRepository.OnNewTraces(_trace.FirstSpan.Source.ApplicationKey, SubscriptionType.Read, () => InvokeAsync(async () => 248trace ??= TelemetryRepository.GetTrace(traceId);
Components\Pages\Traces.razor.cs (9)
52public required TelemetryRepository TelemetryRepository { get; init; } 117if (DashboardOptions.Value.TelemetryLimits.MaxTraceCount == traces.TotalItemCount && !TelemetryRepository.HasDisplayedMaxTraceLimitMessage) 127TelemetryRepository.HasDisplayedMaxTraceLimitMessage = true; 152_applicationsSubscription = TelemetryRepository.OnNewApplications(callback: () => InvokeAsync(workItem: () => 179_applications = TelemetryRepository.GetApplications(); 200_tracesSubscription = TelemetryRepository.OnNewTraces(selectedApplicationKey, SubscriptionType.Read, async () => 307PropertyKeys = TelemetryRepository.GetTracePropertyKeys(PageViewModel.SelectedApplication.Id?.GetApplicationKey()), 309GetFieldValues = TelemetryRepository.GetTraceFieldValues 333TelemetryRepository.ClearTraces(key);
Components\ResourcesGridColumns\UnreadLogErrorsBadge.razor.cs (3)
22public required TelemetryRepository TelemetryRepository { get; init; } 36var application = TelemetryRepository.GetApplicationByCompositeName(resource.Name); 47var applications = TelemetryRepository.GetApplications();
DashboardWebApplication.cs (1)
235builder.Services.AddSingleton<TelemetryRepository>();
Model\StructuredLogsViewModel.cs (2)
12private readonly TelemetryRepository _telemetryRepository; 22public StructuredLogsViewModel(TelemetryRepository telemetryRepository)
Model\TracesViewModel.cs (2)
12private readonly TelemetryRepository _telemetryRepository; 21public TracesViewModel(TelemetryRepository telemetryRepository)
Otlp\OtlpLogsService.cs (2)
13private readonly TelemetryRepository _telemetryRepository; 15public OtlpLogsService(ILogger<OtlpLogsService> logger, TelemetryRepository telemetryRepository)
Otlp\OtlpMetricsService.cs (2)
13private readonly TelemetryRepository _telemetryRepository; 15public OtlpMetricsService(ILogger<OtlpMetricsService> logger, TelemetryRepository telemetryRepository)
Otlp\OtlpTraceService.cs (2)
13private readonly TelemetryRepository _telemetryRepository; 15public OtlpTraceService(ILogger<OtlpTraceService> logger, TelemetryRepository telemetryRepository)
Otlp\Storage\Subscription.cs (2)
15private readonly TelemetryRepository _telemetryRepository; 30public Subscription(string name, ApplicationKey? applicationKey, SubscriptionType subscriptionType, Func<Task> callback, Action unsubscribe, ExecutionContext? executionContext, TelemetryRepository telemetryRepository)
Otlp\Storage\TelemetryRepository.cs (1)
58var logger = loggerFactory.CreateLogger(typeof(TelemetryRepository));
Aspire.Dashboard.Components.Tests (17)
Pages\MetricsTests.cs (4)
85var telemetryRepository = Services.GetRequiredService<TelemetryRepository>(); 130var telemetryRepository = Services.GetRequiredService<TelemetryRepository>();
Pages\StructuredLogsTests.cs (1)
176Services.AddSingleton<TelemetryRepository>();
Pages\TraceDetailsTests.cs (6)
44var telemetryRepository = Services.GetRequiredService<TelemetryRepository>(); 76Assert.Equal(nameof(TelemetryRepository.OnNewTraces), t.Name); 95var telemetryRepository = Services.GetRequiredService<TelemetryRepository>(); 168Services.AddSingleton<TelemetryRepository>();
Shared\MetricsSetupHelpers.cs (2)
40context.Services.AddSingleton<TelemetryRepository>(); 75context.Services.AddSingleton<TelemetryRepository>();
Shared\ResourceSetupHelpers.cs (1)
19context.Services.AddSingleton<TelemetryRepository>();
Shared\StructuredLogsSetupHelpers.cs (1)
19context.Services.AddSingleton<TelemetryRepository>();
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
221public static TelemetryRepository CreateRepository( 252var repository = new TelemetryRepository(
Aspire.Dashboard.Tests (62)
TelemetryRepositoryTests\ApplicationTests.cs (5)
19var repository = CreateRepository(); 61var repository = CreateRepository(); 99var repository = CreateRepository(); 131var repository = CreateRepository(); 149private static void AddResource(TelemetryRepository repository, string name, string? instanceId = null)
TelemetryRepositoryTests\LogTests.cs (21)
35var repository = CreateRepository(); 98var repository = CreateRepository(); 139var repository = CreateRepository(); 201var repository = CreateRepository(); 276var repository = CreateRepository(); 328var repository = CreateRepository(); 381var repository = CreateRepository(); 418var repository = CreateRepository(); 437var repository = CreateRepository(); 450var repository = CreateRepository(); 534var repository = CreateRepository(); 574var repository = CreateRepository(); 619var repository = CreateRepository(maxAttributeCount: 5, maxAttributeLength: 16); 709var repository = CreateRepository(subscriptionMinExecuteInterval: minExecuteInterval, loggerFactory: loggerFactory); 783var repository = CreateRepository(); 830var repository = CreateRepository(); 929var repository = CreateRepository(); 1018var repository = CreateRepository(); 1083var repository = CreateRepository(); 1157var repository = CreateRepository(); 1223var repository = CreateRepository();
TelemetryRepositoryTests\MetricsTests.cs (9)
26var repository = CreateRepository(); 99var repository = CreateRepository(maxAttributeCount: 5, maxAttributeLength: 16); 213var repository = CreateRepository(maxAttributeCount: 5, maxAttributeLength: 16); 318var repository = CreateRepository(); 426var repository = CreateRepository(maxMetricsCount: 3); 505var repository = CreateRepository(); 624var repository = CreateRepository(); 699var repository = CreateRepository(); 857var repository = CreateRepository();
TelemetryRepositoryTests\TraceTests.cs (25)
34var result = TelemetryRepository.ConvertSpanKind(value); 42var repository = CreateRepository(); 102var repository = CreateRepository(loggerFactory: factory); 155var repository = CreateRepository(); 210var repository = CreateRepository(); 265var repository = CreateRepository(); 343var repository = CreateRepository(); 465var repository = CreateRepository(); 518var repository = CreateRepository(); 595var repository = CreateRepository(); 704var repository = CreateRepository(); 764var repository = CreateRepository(maxAttributeCount: 5, maxAttributeLength: 16, maxSpanEventCount: 5); 859var repository = CreateRepository(); 903var repository = CreateRepository(maxTraceCount: MaxTraceCount); 958private static void AddTrace(TelemetryRepository repository, string traceId, DateTime startTime) 1014var repository = CreateRepository(); 1064var repository = CreateRepository(); 1140var repository = CreateRepository(); 1240var repository = CreateRepository(); 1304var repository = CreateRepository(); 1420var repository = CreateRepository(); 1565var repository = CreateRepository(); 1644var repository = CreateRepository(); 1750var repository = CreateRepository(); 1839var repository = CreateRepository();
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
221public static TelemetryRepository CreateRepository( 252var repository = new TelemetryRepository(