3 instantiations of OtlpInstrumentData
Aspire.Dashboard (2)
Components\Controls\Chart\MetricInstrumentDataCache.cs (1)
76return new OtlpInstrumentData
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
158return new OtlpInstrumentData
Aspire.Dashboard.Tests (1)
ChartDataCalculatorTests.cs (1)
951return new OtlpInstrumentData
133 references to OtlpInstrumentData
Aspire.Dashboard (19)
Components\Controls\Chart\ChartContainer.razor.cs (8)
22private OtlpInstrumentData? _instrument; 186private async Task UpdateInstrumentDataAsync(OtlpInstrumentData instrument) 252private async Task<(long UpdateVersion, OtlpInstrumentData? Instrument)> GetInstrumentAsync(bool useIncrementalCache, CancellationToken cancellationToken) 255OtlpInstrumentData? baseInstrument; 311var refreshedInstrument = await TelemetryRepository.GetInstrumentAsync(new GetInstrumentRequest 336var instrument = baseInstrument is not null && cursors.Count > 0 342private bool TryPublishInstrument((long UpdateVersion, OtlpInstrumentData? Instrument) result) 444private bool HaveDimensionFilterValuesChanged(OtlpInstrumentData instrument)
Components\Controls\Chart\MetricInstrumentDataCache.cs (4)
12public static List<MetricDimensionCursor> CreateCursors(OtlpInstrumentData data, TimeSpan refreshLookback, TimeSpan dataPointInterval) 41public static OtlpInstrumentData Merge( 42OtlpInstrumentData cached, 43OtlpInstrumentData refreshed,
Model\TelemetryExportService.cs (4)
198var instrumentsData = new List<OtlpInstrumentData>(); 201var instrumentData = await _dataSource.TelemetryRepository.GetInstrumentAsync(new GetInstrumentRequest 470internal static OtlpTelemetryDataJson ConvertMetricsToOtlpJson(List<OtlpInstrumentData> instruments) 490private static OtlpMetricJson ConvertInstrument(OtlpInstrumentData instrumentData)
Otlp\Storage\ITelemetryRepository.cs (1)
64Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken);
Otlp\Storage\SqliteTelemetryRepository.cs (1)
230public Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) =>
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
131private OtlpInstrumentData? GetInstrumentFromDatabase(GetInstrumentRequest request, CancellationToken cancellationToken)
Aspire.Dashboard.Components.Tests (1)
Shared\TestTelemetryRepository.cs (1)
52public Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) => inner.GetInstrumentAsync(request, cancellationToken);
Aspire.Dashboard.Tests (113)
ChartDataCalculatorTests.cs (7)
880var cached = CreateInstrumentData([cachedDimension]); 881var refreshed = CreateInstrumentData([refreshedDimension, newDimension]); 887var merged = MetricInstrumentDataCache.Merge(cached, refreshed, cursors, start); 911var cached = CreateInstrumentData([cachedDimension]); 912var refreshed = CreateInstrumentData([refreshedDimension]); 917var merged = MetricInstrumentDataCache.Merge(cached, refreshed, cursors, start); 947private static OtlpInstrumentData CreateInstrumentData(List<DimensionScope> dimensions)
Integration\OtlpHttpJsonTests.cs (1)
769var instrumentData = await telemetryRepository.GetInstrumentAsync(new GetInstrumentRequest
Model\TelemetryExportServiceTests.cs (4)
549var instrumentsData = new List<OtlpInstrumentData>(); 552var instrumentData = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 637var instrumentsData = new List<OtlpInstrumentData>(); 640var instrumentData = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
TelemetryRepositoryTests\HistogramTests.cs (49)
58var instrument = await GetInstrumentAsync(readOnly.Repository, rollup); 72var merged = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_start); 75var filtered = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 86var afterSamples = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 110var imported = await GetInstrumentAsync(destination.Repository, rollup); 133var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 170var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 213var instrument = await GetInstrumentAsync(readOnly.Repository, rollup: true); 250var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 262var rolledUp = await GetInstrumentAsync(context.Repository, rollup: true); 296var instrument = await GetInstrumentAsync(reopened.Repository, rollup: false); 317var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 346var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 376var instrument = await GetInstrumentAsync(repository, rollup); 446var histogram = await GetInstrumentAsync(context.Repository, rollup: false); 506var histogram = await GetInstrumentAsync(context.Repository, rollup); 513var gauge = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 555var instrument = await GetInstrumentAsync(context.Repository, rollup); 610var instrument = await GetInstrumentAsync(reopened.Repository, rollup); 685var instrument = await GetInstrumentAsync(repository, rollup); 757var instrument = await GetInstrumentAsync(repository, rollup); 803var instrument = await GetInstrumentAsync(source.Repository, rollup); 821var imported = await GetInstrumentAsync(destination.Repository, rollup); 883var instrument = await GetInstrumentAsync(context.Repository, rollup); 914var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 933var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 996var raw = await GetInstrumentAsync(repository, rollup: false); 1009var instrument = await repository.GetInstrumentAsync(request, CancellationToken.None); 1035var refreshed = await repository.GetInstrumentAsync(new GetInstrumentRequest 1046var merged = MetricInstrumentDataCache.Merge(instrument, refreshed, cursors, request.StartTime!.Value); 1052var partial = await repository.GetInstrumentAsync(new GetInstrumentRequest 1085var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 1126var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 1147var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 1182var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 1193var instrument = await GetInstrumentAsync(reopened.Repository, rollup); 1228var finalInstrument = await GetInstrumentAsync(readOnly.Repository, rollup); 1296var instrument = await GetInstrumentAsync(source.Repository, rollup); 1298var cloned = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_start); 1316var imported = await GetInstrumentAsync(destination.Repository, rollup); 1345var instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 1419var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 1440var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 1506var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 1525var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 1539var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 1563private static async Task<OtlpInstrumentData> GetInstrumentAsync(ITelemetryRepository repository, bool rollup) 1565var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 1578private static void AssertPercentiles(OtlpInstrumentData instrument, double?[] expected)
TelemetryRepositoryTests\MetricsTests.cs (49)
158var instrument = (await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 259var instrument = (await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 310var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 377var instrumentData = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 412var filteredInstrumentData = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 479var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 565var instrument = (await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 683var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 859var resource1Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 874var resource1Test2Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 904var resource2Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 919var resource2Test3Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1004var resource1Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1015var resource1Test2Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1044var resource2Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1059var resource2Test3Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1152var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1208var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1272var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1319var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1399var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1468var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1531var instrument1 = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1548var instrument2 = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1642var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1686var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1728var instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 1802var instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 1817var cloned = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_queryTestTime); 1850var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 1874var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 1907var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 1936var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 1961var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 1984var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2025var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2075var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2154var initialInstrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2189var refreshedInstrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2245var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2274var initialInstrument = await GetInstrumentAsync([]); 2283var refreshedInstrument = await GetInstrumentAsync(cursors); 2309async Task<OtlpInstrumentData> GetInstrumentAsync(IReadOnlyList<MetricDimensionCursor> dimensionCursors) 2366var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2432var histogramInstrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2444var sumInstrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2496var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2540var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2593var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
TelemetryRepositoryTests\SqliteTelemetryPersistenceTests.cs (3)
425var instrument = await historicalContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 519var instrument = await reopenedContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 586var instrument = await reopenedContext.Repository.GetInstrumentAsync(new GetInstrumentRequest