2 instantiations of TelemetryRepository
Aspire.Dashboard.Components.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
251var repository = new TelemetryRepository(
Aspire.Dashboard.Tests (1)
tests\Shared\Telemetry\TelemetryTestHelpers.cs (1)
251var repository = new TelemetryRepository(
113 references to TelemetryRepository
Aspire.Dashboard (47)
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\Pages\Resources.razor.cs (4)
35public required TelemetryRepository TelemetryRepository { get; init; } 159_applicationUnviewedErrorCounts = TelemetryRepository.GetApplicationUnviewedErrorLogsCount(); 166_logsSubscription = TelemetryRepository.OnNewLogs(null, SubscriptionType.Other, async () => 168var newApplicationUnviewedErrorCounts = TelemetryRepository.GetApplicationUnviewedErrorLogsCount();
Components\Pages\StructuredLogs.razor.cs (9)
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
Components\Pages\TraceDetail.razor.cs (5)
44public required TelemetryRepository TelemetryRepository { get; init; } 136_applications = TelemetryRepository.GetApplications(); 142_trace = TelemetryRepository.GetTrace(TraceId); 162_tracesSubscription = TelemetryRepository.OnNewTraces(_trace.FirstSpan.Source.ApplicationKey, SubscriptionType.Read, () => InvokeAsync(async () => 238trace ??= TelemetryRepository.GetTrace(traceId);
Components\Pages\Traces.razor.cs (8)
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(); 199_tracesSubscription = TelemetryRepository.OnNewTraces(selectedApplicationKey, SubscriptionType.Read, async () => 306PropertyKeys = TelemetryRepository.GetTracePropertyKeys(PageViewModel.SelectedApplication.Id?.GetApplicationKey()), 308GetFieldValues = TelemetryRepository.GetTraceFieldValues
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)
239builder.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 (15)
Pages\MetricsTests.cs (4)
85var telemetryRepository = Services.GetRequiredService<TelemetryRepository>(); 130var telemetryRepository = Services.GetRequiredService<TelemetryRepository>();
Pages\StructuredLogsTests.cs (1)
176Services.AddSingleton<TelemetryRepository>();
Pages\TraceDetailsTests.cs (4)
42var telemetryRepository = Services.GetRequiredService<TelemetryRepository>(); 74Assert.Equal(nameof(TelemetryRepository.OnNewTraces), t.Name); 110Services.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)
220public static TelemetryRepository CreateRepository( 251var repository = new TelemetryRepository(
Aspire.Dashboard.Tests (51)
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 (17)
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();
TelemetryRepositoryTests\MetricsTests.cs (6)
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();
TelemetryRepositoryTests\TraceTests.cs (21)
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();
tests\Shared\Telemetry\TelemetryTestHelpers.cs (2)
220public static TelemetryRepository CreateRepository( 251var repository = new TelemetryRepository(