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