3 instantiations of OtlpInstrumentData
Aspire.Dashboard (2)
Components\Controls\Chart\MetricInstrumentDataCache.cs (1)
82
return new
OtlpInstrumentData
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
227
return new
OtlpInstrumentData
Aspire.Dashboard.Tests (1)
ChartDataCalculatorTests.cs (1)
1220
return new
OtlpInstrumentData
157 references to OtlpInstrumentData
Aspire.Dashboard (20)
Components\Controls\Chart\ChartContainer.razor.cs (8)
22
private
OtlpInstrumentData
? _instrument;
212
private async Task UpdateInstrumentDataAsync(
OtlpInstrumentData
instrument)
306
private async Task<(long UpdateVersion,
OtlpInstrumentData
? Instrument)> GetInstrumentAsync(bool useIncrementalCache, CancellationToken cancellationToken)
309
OtlpInstrumentData
? baseInstrument;
365
var
refreshedInstrument = await TelemetryRepository.GetInstrumentAsync(new GetInstrumentRequest
390
var
instrument = baseInstrument is not null && cursors.Count > 0
396
private bool TryPublishInstrument((long UpdateVersion,
OtlpInstrumentData
? Instrument) result)
498
private bool HaveDimensionFilterValuesChanged(
OtlpInstrumentData
instrument)
Components\Controls\Chart\LiveSparklinesBase.cs (1)
308
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)
74
Task<
OtlpInstrumentData
?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken);
Otlp\Storage\SqliteTelemetryRepository.cs (1)
271
public Task<
OtlpInstrumentData
?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) =>
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
200
private
OtlpInstrumentData
? GetInstrumentFromDatabase(GetInstrumentRequest request, CancellationToken cancellationToken)
Aspire.Dashboard.Components.Tests (2)
Shared\TestTelemetryRepository.cs (2)
15
public Func<GetInstrumentRequest, CancellationToken, Task<
OtlpInstrumentData
?>>? GetInstrumentAsyncHandler { get; init; }
79
public Task<
OtlpInstrumentData
?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) =>
Aspire.Dashboard.Tests (135)
ChartDataCalculatorTests.cs (10)
415
var
cached = CreateInstrumentData([dimension], OtlpInstrumentType.Sum, OtlpAggregationTemporality.Delta);
416
var
merged = MetricInstrumentDataCache.Merge(cached, cached, [], s_startTime.AddHours(-1).UtcDateTime);
1125
var
cached = CreateInstrumentData([cachedDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative);
1126
var
refreshed = CreateInstrumentData([refreshedDimension, newDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative);
1132
var
merged = MetricInstrumentDataCache.Merge(cached, refreshed, cursors, start);
1156
var
cached = CreateInstrumentData([cachedDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative);
1157
var
refreshed = CreateInstrumentData([refreshedDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative);
1162
var
merged = MetricInstrumentDataCache.Merge(cached, refreshed, cursors, start);
1183
var
merged = MetricInstrumentDataCache.Merge(
1216
private static
OtlpInstrumentData
CreateInstrumentData(List<DimensionScope> dimensions, OtlpInstrumentType type, OtlpAggregationTemporality temporality)
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 (67)
61
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
83
var
instrument = await GetRolledUpDeltaInstrumentAsync(4611686018427387904, 4611686018427387904);
92
var
instrument = await GetRolledUpDeltaInstrumentAsync(long.MinValue, long.MinValue, long.MaxValue);
110
var
instrument = await GetDeltaInstrumentAsync(points, start, start.AddMinutes(1), TimeSpan.FromMinutes(1), includeExemplars: false);
120
var
instrument = await GetRolledUpDeltaInstrumentAsync(9007199254740993, 9007199254740993);
126
private async Task<
OtlpInstrumentData
> GetRolledUpDeltaInstrumentAsync(params long[] values)
139
private async Task<
OtlpInstrumentData
> GetDeltaInstrumentAsync(IEnumerable<NumberDataPoint> points, DateTime startTime, DateTime endTime, TimeSpan dataPointInterval, bool includeExemplars)
164
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
193
var
instrument = await GetDeltaInstrumentAsync(
214
var
instrument = await GetDeltaInstrumentAsync(
235
var
instrument = await GetDeltaInstrumentAsync(
254
var
instrument = await GetDeltaInstrumentAsync(
275
var
instrument = await GetDeltaInstrumentAsync(
296
var
instrument = await GetDeltaInstrumentAsync(
347
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
400
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
552
var
instrument = (await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
653
var
instrument = (await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
704
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
771
var
instrumentData = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
806
var
filteredInstrumentData = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
873
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
959
var
instrument = (await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1077
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1253
var
resource1Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1268
var
resource1Test2Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1298
var
resource2Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1313
var
resource2Test3Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1398
var
resource1Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1409
var
resource1Test2Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1438
var
resource2Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1453
var
resource2Test3Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1546
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1602
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1666
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1713
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1793
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1862
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1925
var
instrument1 = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
1942
var
instrument2 = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2036
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2080
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2144
var
instrument = await readOnly.Repository.GetInstrumentAsync(request, CancellationToken.None);
2154
var
after = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest
2300
var
instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest
2374
var
instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest
2389
var
cloned = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_queryTestTime);
2422
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
2446
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
2479
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
2508
var
instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest
2533
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
2556
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
2597
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2647
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2726
var
initialInstrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2761
var
refreshedInstrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2817
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
2846
var
initialInstrument = await GetInstrumentAsync([]);
2855
var
refreshedInstrument = await GetInstrumentAsync(cursors);
2881
async Task<
OtlpInstrumentData
> GetInstrumentAsync(IReadOnlyList<MetricDimensionCursor> dimensionCursors)
2938
var
instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
3004
var
histogramInstrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
3016
var
sumInstrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
3068
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
3112
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
3165
var
instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
TelemetryRepositoryTests\SqliteTelemetryPersistenceTests.cs (3)
611
var
instrument = await historicalContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
705
var
instrument = await reopenedContext.Repository.GetInstrumentAsync(new GetInstrumentRequest
772
var
instrument = await reopenedContext.Repository.GetInstrumentAsync(new GetInstrumentRequest