3 instantiations of OtlpInstrumentData
Aspire.Dashboard (2)
Components\Controls\Chart\MetricInstrumentDataCache.cs (1)
82return new OtlpInstrumentData
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
227return new OtlpInstrumentData
Aspire.Dashboard.Tests (1)
ChartDataCalculatorTests.cs (1)
1220return new OtlpInstrumentData
157 references to OtlpInstrumentData
Aspire.Dashboard (20)
Components\Controls\Chart\ChartContainer.razor.cs (8)
22private OtlpInstrumentData? _instrument; 212private async Task UpdateInstrumentDataAsync(OtlpInstrumentData instrument) 306private async Task<(long UpdateVersion, OtlpInstrumentData? Instrument)> GetInstrumentAsync(bool useIncrementalCache, CancellationToken cancellationToken) 309OtlpInstrumentData? baseInstrument; 365var refreshedInstrument = await TelemetryRepository.GetInstrumentAsync(new GetInstrumentRequest 390var instrument = baseInstrument is not null && cursors.Count > 0 396private bool TryPublishInstrument((long UpdateVersion, OtlpInstrumentData? Instrument) result) 498private bool HaveDimensionFilterValuesChanged(OtlpInstrumentData instrument)
Components\Controls\Chart\LiveSparklinesBase.cs (1)
308var data = await TelemetryRepository.GetInstrumentAsync(new GetInstrumentRequest
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)
74Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken);
Otlp\Storage\SqliteTelemetryRepository.cs (1)
271public Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) =>
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
200private OtlpInstrumentData? GetInstrumentFromDatabase(GetInstrumentRequest request, CancellationToken cancellationToken)
Aspire.Dashboard.Components.Tests (2)
Shared\TestTelemetryRepository.cs (2)
15public Func<GetInstrumentRequest, CancellationToken, Task<OtlpInstrumentData?>>? GetInstrumentAsyncHandler { get; init; } 79public Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) =>
Aspire.Dashboard.Tests (135)
ChartDataCalculatorTests.cs (10)
415var cached = CreateInstrumentData([dimension], OtlpInstrumentType.Sum, OtlpAggregationTemporality.Delta); 416var merged = MetricInstrumentDataCache.Merge(cached, cached, [], s_startTime.AddHours(-1).UtcDateTime); 1125var cached = CreateInstrumentData([cachedDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative); 1126var refreshed = CreateInstrumentData([refreshedDimension, newDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative); 1132var merged = MetricInstrumentDataCache.Merge(cached, refreshed, cursors, start); 1156var cached = CreateInstrumentData([cachedDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative); 1157var refreshed = CreateInstrumentData([refreshedDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative); 1162var merged = MetricInstrumentDataCache.Merge(cached, refreshed, cursors, start); 1183var merged = MetricInstrumentDataCache.Merge( 1216private static OtlpInstrumentData CreateInstrumentData(List<DimensionScope> dimensions, OtlpInstrumentType type, OtlpAggregationTemporality temporality)
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 (50)
62var instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 119var instrument = await GetInstrumentAsync(readOnly.Repository, rollup); 133var merged = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_start); 136var filtered = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 147var afterSamples = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 171var imported = await GetInstrumentAsync(destination.Repository, rollup); 194var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 231var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 274var instrument = await GetInstrumentAsync(readOnly.Repository, rollup: true); 311var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 323var rolledUp = await GetInstrumentAsync(context.Repository, rollup: true); 357var instrument = await GetInstrumentAsync(reopened.Repository, rollup: false); 378var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 407var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 437var instrument = await GetInstrumentAsync(repository, rollup); 507var histogram = await GetInstrumentAsync(context.Repository, rollup: false); 567var histogram = await GetInstrumentAsync(context.Repository, rollup); 574var gauge = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 616var instrument = await GetInstrumentAsync(context.Repository, rollup); 671var instrument = await GetInstrumentAsync(reopened.Repository, rollup); 746var instrument = await GetInstrumentAsync(repository, rollup); 818var instrument = await GetInstrumentAsync(repository, rollup); 864var instrument = await GetInstrumentAsync(source.Repository, rollup); 882var imported = await GetInstrumentAsync(destination.Repository, rollup); 944var instrument = await GetInstrumentAsync(context.Repository, rollup); 975var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 994var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 1057var raw = await GetInstrumentAsync(repository, rollup: false); 1070var instrument = await repository.GetInstrumentAsync(request, CancellationToken.None); 1096var refreshed = await repository.GetInstrumentAsync(new GetInstrumentRequest 1107var merged = MetricInstrumentDataCache.Merge(instrument, refreshed, cursors, request.StartTime!.Value); 1113var partial = await repository.GetInstrumentAsync(new GetInstrumentRequest 1146var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 1187var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 1208var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 1243var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 1254var instrument = await GetInstrumentAsync(reopened.Repository, rollup); 1289var finalInstrument = await GetInstrumentAsync(readOnly.Repository, rollup); 1357var instrument = await GetInstrumentAsync(source.Repository, rollup); 1359var cloned = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_start); 1377var imported = await GetInstrumentAsync(destination.Repository, rollup); 1406var instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 1480var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 1501var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 1567var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 1586var instrument = await GetInstrumentAsync(context.Repository, rollup: true); 1600var instrument = await GetInstrumentAsync(context.Repository, rollup: false); 1624private static async Task<OtlpInstrumentData> GetInstrumentAsync(ITelemetryRepository repository, bool rollup) 1626var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 1639private static void AssertPercentiles(OtlpInstrumentData instrument, double?[] expected)
TelemetryRepositoryTests\MetricsTests.cs (67)
61var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 83var instrument = await GetRolledUpDeltaInstrumentAsync(4611686018427387904, 4611686018427387904); 92var instrument = await GetRolledUpDeltaInstrumentAsync(long.MinValue, long.MinValue, long.MaxValue); 110var instrument = await GetDeltaInstrumentAsync(points, start, start.AddMinutes(1), TimeSpan.FromMinutes(1), includeExemplars: false); 120var instrument = await GetRolledUpDeltaInstrumentAsync(9007199254740993, 9007199254740993); 126private async Task<OtlpInstrumentData> GetRolledUpDeltaInstrumentAsync(params long[] values) 139private async Task<OtlpInstrumentData> GetDeltaInstrumentAsync(IEnumerable<NumberDataPoint> points, DateTime startTime, DateTime endTime, TimeSpan dataPointInterval, bool includeExemplars) 164var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 193var instrument = await GetDeltaInstrumentAsync( 214var instrument = await GetDeltaInstrumentAsync( 235var instrument = await GetDeltaInstrumentAsync( 254var instrument = await GetDeltaInstrumentAsync( 275var instrument = await GetDeltaInstrumentAsync( 296var instrument = await GetDeltaInstrumentAsync( 347var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 400var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 552var instrument = (await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 653var instrument = (await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 704var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 771var instrumentData = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 806var filteredInstrumentData = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 873var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 959var instrument = (await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1077var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1253var resource1Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1268var resource1Test2Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1298var resource2Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1313var resource2Test3Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1398var resource1Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1409var resource1Test2Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1438var resource2Test1Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1453var resource2Test3Instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1546var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1602var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1666var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1713var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1793var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1862var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1925var instrument1 = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 1942var instrument2 = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2036var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2080var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2144var instrument = await readOnly.Repository.GetInstrumentAsync(request, CancellationToken.None); 2154var after = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 2300var instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 2374var instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 2389var cloned = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_queryTestTime); 2422var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 2446var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 2479var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 2508var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 2533var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2556var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2597var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2647var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2726var initialInstrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2761var refreshedInstrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2817var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2846var initialInstrument = await GetInstrumentAsync([]); 2855var refreshedInstrument = await GetInstrumentAsync(cursors); 2881async Task<OtlpInstrumentData> GetInstrumentAsync(IReadOnlyList<MetricDimensionCursor> dimensionCursors) 2938var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 3004var histogramInstrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 3016var sumInstrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 3068var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 3112var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 3165var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
TelemetryRepositoryTests\SqliteTelemetryPersistenceTests.cs (3)
611var instrument = await historicalContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 705var instrument = await reopenedContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 772var instrument = await reopenedContext.Repository.GetInstrumentAsync(new GetInstrumentRequest