3 instantiations of OtlpInstrumentData
Aspire.Dashboard (2)
Components\Controls\Chart\MetricInstrumentDataCache.cs (1)
76
return new
OtlpInstrumentData
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
159
return new
OtlpInstrumentData
Aspire.Dashboard.Tests (1)
ChartDataCalculatorTests.cs (1)
996
return new
OtlpInstrumentData
137 references to OtlpInstrumentData
Aspire.Dashboard (20)
Components\Controls\Chart\ChartContainer.razor.cs (8)
22
private
OtlpInstrumentData
? _instrument;
218
private async Task UpdateInstrumentDataAsync(
OtlpInstrumentData
instrument)
312
private async Task<(long UpdateVersion,
OtlpInstrumentData
? Instrument)> GetInstrumentAsync(bool useIncrementalCache, CancellationToken cancellationToken)
315
OtlpInstrumentData
? baseInstrument;
371
var
refreshedInstrument = await TelemetryRepository.GetInstrumentAsync(new GetInstrumentRequest
396
var
instrument = baseInstrument is not null && cursors.Count > 0
402
private bool TryPublishInstrument((long UpdateVersion,
OtlpInstrumentData
? Instrument) result)
504
private bool HaveDimensionFilterValuesChanged(
OtlpInstrumentData
instrument)
Components\Controls\Chart\LiveSparklinesBase.cs (1)
276
var
data = await TelemetryRepository.GetInstrumentAsync(new GetInstrumentRequest
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)
73
Task<
OtlpInstrumentData
?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken);
Otlp\Storage\SqliteTelemetryRepository.cs (1)
269
public Task<
OtlpInstrumentData
?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) =>
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
132
private
OtlpInstrumentData
? GetInstrumentFromDatabase(GetInstrumentRequest request, CancellationToken cancellationToken)
Aspire.Dashboard.Components.Tests (1)
Shared\TestTelemetryRepository.cs (1)
68
public Task<
OtlpInstrumentData
?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) => inner.GetInstrumentAsync(request, cancellationToken);
Aspire.Dashboard.Tests (116)
ChartDataCalculatorTests.cs (7)
925
var
cached = CreateInstrumentData([cachedDimension]);
926
var
refreshed = CreateInstrumentData([refreshedDimension, newDimension]);
932
var
merged = MetricInstrumentDataCache.Merge(cached, refreshed, cursors, start);
956
var
cached = CreateInstrumentData([cachedDimension]);
957
var
refreshed = CreateInstrumentData([refreshedDimension]);
962
var
merged = MetricInstrumentDataCache.Merge(cached, refreshed, cursors, start);
992
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 (50)
62
var
instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest
119
var
instrument = await GetInstrumentAsync(readOnly.Repository, rollup);
133
var
merged = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_start);
136
var
filtered = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest
147
var
afterSamples = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest
171
var
imported = await GetInstrumentAsync(destination.Repository, rollup);
194
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
231
var
instrument = await GetInstrumentAsync(context.Repository, rollup: false);
274
var
instrument = await GetInstrumentAsync(readOnly.Repository, rollup: true);
311
var
instrument = await GetInstrumentAsync(context.Repository, rollup: false);
323
var
rolledUp = await GetInstrumentAsync(context.Repository, rollup: true);
357
var
instrument = await GetInstrumentAsync(reopened.Repository, rollup: false);
378
var
instrument = await GetInstrumentAsync(context.Repository, rollup: true);
407
var
instrument = await GetInstrumentAsync(context.Repository, rollup: false);
437
var
instrument = await GetInstrumentAsync(repository, rollup);
507
var
histogram = await GetInstrumentAsync(context.Repository, rollup: false);
567
var
histogram = await GetInstrumentAsync(context.Repository, rollup);
574
var
gauge = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
616
var
instrument = await GetInstrumentAsync(context.Repository, rollup);
671
var
instrument = await GetInstrumentAsync(reopened.Repository, rollup);
746
var
instrument = await GetInstrumentAsync(repository, rollup);
818
var
instrument = await GetInstrumentAsync(repository, rollup);
864
var
instrument = await GetInstrumentAsync(source.Repository, rollup);
882
var
imported = await GetInstrumentAsync(destination.Repository, rollup);
944
var
instrument = await GetInstrumentAsync(context.Repository, rollup);
975
var
instrument = await GetInstrumentAsync(context.Repository, rollup: true);
994
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
1057
var
raw = await GetInstrumentAsync(repository, rollup: false);
1070
var
instrument = await repository.GetInstrumentAsync(request, CancellationToken.None);
1096
var
refreshed = await repository.GetInstrumentAsync(new GetInstrumentRequest
1107
var
merged = MetricInstrumentDataCache.Merge(instrument, refreshed, cursors, request.StartTime!.Value);
1113
var
partial = await repository.GetInstrumentAsync(new GetInstrumentRequest
1146
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
1187
var
instrument = await GetInstrumentAsync(context.Repository, rollup: true);
1208
var
instrument = await GetInstrumentAsync(context.Repository, rollup: true);
1243
var
instrument = await GetInstrumentAsync(context.Repository, rollup: false);
1254
var
instrument = await GetInstrumentAsync(reopened.Repository, rollup);
1289
var
finalInstrument = await GetInstrumentAsync(readOnly.Repository, rollup);
1357
var
instrument = await GetInstrumentAsync(source.Repository, rollup);
1359
var
cloned = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_start);
1377
var
imported = await GetInstrumentAsync(destination.Repository, rollup);
1406
var
instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest
1480
var
instrument = await GetInstrumentAsync(context.Repository, rollup: true);
1501
var
instrument = await GetInstrumentAsync(context.Repository, rollup: false);
1567
var
instrument = await GetInstrumentAsync(context.Repository, rollup: true);
1586
var
instrument = await GetInstrumentAsync(context.Repository, rollup: true);
1600
var
instrument = await GetInstrumentAsync(context.Repository, rollup: false);
1624
private static async Task<
OtlpInstrumentData
> GetInstrumentAsync(ITelemetryRepository repository, bool rollup)
1626
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
1639
private static void AssertPercentiles(
OtlpInstrumentData
instrument, double?[] expected)
TelemetryRepositoryTests\MetricsTests.cs (51)
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
1750
var
instrument = await readOnly.Repository.GetInstrumentAsync(request, CancellationToken.None);
1760
var
after = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest
1906
var
instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest
1980
var
instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest
1995
var
cloned = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_queryTestTime);
2028
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
2052
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
2085
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
2114
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
2139
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
2162
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
2203
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2253
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2332
var
initialInstrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2367
var
refreshedInstrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2423
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2452
var
initialInstrument = await GetInstrumentAsync([]);
2461
var
refreshedInstrument = await GetInstrumentAsync(cursors);
2487
async Task<
OtlpInstrumentData
> GetInstrumentAsync(IReadOnlyList<MetricDimensionCursor> dimensionCursors)
2544
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2610
var
histogramInstrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
2622
var
sumInstrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
2674
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
2718
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
2771
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
TelemetryRepositoryTests\SqliteTelemetryPersistenceTests.cs (3)
454
var
instrument = await historicalContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
548
var
instrument = await reopenedContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
615
var
instrument = await reopenedContext.Repository.GetInstrumentAsync(new GetInstrumentRequest