3 instantiations of OtlpInstrumentData
Aspire.Dashboard (2)
Components\Controls\Chart\MetricInstrumentDataCache.cs (1)
76return new OtlpInstrumentData
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
159return new OtlpInstrumentData
Aspire.Dashboard.Tests (1)
ChartDataCalculatorTests.cs (1)
996return new OtlpInstrumentData
137 references to OtlpInstrumentData
Aspire.Dashboard (20)
Components\Controls\Chart\ChartContainer.razor.cs (8)
22private OtlpInstrumentData? _instrument; 218private async Task UpdateInstrumentDataAsync(OtlpInstrumentData instrument) 312private async Task<(long UpdateVersion, OtlpInstrumentData? Instrument)> GetInstrumentAsync(bool useIncrementalCache, CancellationToken cancellationToken) 315OtlpInstrumentData? baseInstrument; 371var refreshedInstrument = await TelemetryRepository.GetInstrumentAsync(new GetInstrumentRequest 396var instrument = baseInstrument is not null && cursors.Count > 0 402private bool TryPublishInstrument((long UpdateVersion, OtlpInstrumentData? Instrument) result) 504private bool HaveDimensionFilterValuesChanged(OtlpInstrumentData instrument)
Components\Controls\Chart\LiveSparklinesBase.cs (1)
276var 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)
73Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken);
Otlp\Storage\SqliteTelemetryRepository.cs (1)
269public Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) =>
Otlp\Storage\SqliteTelemetryRepository.Metrics.Reads.cs (1)
132private OtlpInstrumentData? GetInstrumentFromDatabase(GetInstrumentRequest request, CancellationToken cancellationToken)
Aspire.Dashboard.Components.Tests (1)
Shared\TestTelemetryRepository.cs (1)
68public Task<OtlpInstrumentData?> GetInstrumentAsync(GetInstrumentRequest request, CancellationToken cancellationToken) => inner.GetInstrumentAsync(request, cancellationToken);
Aspire.Dashboard.Tests (116)
ChartDataCalculatorTests.cs (7)
925var cached = CreateInstrumentData([cachedDimension]); 926var refreshed = CreateInstrumentData([refreshedDimension, newDimension]); 932var merged = MetricInstrumentDataCache.Merge(cached, refreshed, cursors, start); 956var cached = CreateInstrumentData([cachedDimension]); 957var refreshed = CreateInstrumentData([refreshedDimension]); 962var merged = MetricInstrumentDataCache.Merge(cached, refreshed, cursors, start); 992private 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 (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 (51)
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 1750var instrument = await readOnly.Repository.GetInstrumentAsync(request, CancellationToken.None); 1760var after = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 1906var instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 1980var instrument = await readOnly.Repository.GetInstrumentAsync(new GetInstrumentRequest 1995var cloned = MetricInstrumentDataCache.Merge(instrument, instrument, cursors, s_queryTestTime); 2028var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 2052var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 2085var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 2114var instrument = await context.Repository.GetInstrumentAsync(new GetInstrumentRequest 2139var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2162var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2203var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2253var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2332var initialInstrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2367var refreshedInstrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2423var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2452var initialInstrument = await GetInstrumentAsync([]); 2461var refreshedInstrument = await GetInstrumentAsync(cursors); 2487async Task<OtlpInstrumentData> GetInstrumentAsync(IReadOnlyList<MetricDimensionCursor> dimensionCursors) 2544var instrument = await repositoryContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 2610var histogramInstrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2622var sumInstrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2674var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2718var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest 2771var instrument = await repository.GetInstrumentAsync(new GetInstrumentRequest
TelemetryRepositoryTests\SqliteTelemetryPersistenceTests.cs (3)
454var instrument = await historicalContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 548var instrument = await reopenedContext.Repository.GetInstrumentAsync(new GetInstrumentRequest 615var instrument = await reopenedContext.Repository.GetInstrumentAsync(new GetInstrumentRequest