55 references to OtlpInstrumentType
Aspire.Dashboard (28)
Components\Controls\Chart\ChartBase.cs (2)
31private OtlpInstrumentType? _renderedInstrumentType; 212if (InstrumentViewModel.Instrument?.Type != OtlpInstrumentType.Histogram || InstrumentViewModel.ShowCount)
Components\Controls\Chart\ChartContainer.razor.cs (1)
368var includeExemplars = instrumentSummary.Type == OtlpInstrumentType.Histogram;
Components\Controls\Chart\ChartDataCalculator.cs (1)
154=> instrument.Type == OtlpInstrumentType.Sum && instrument.IsMonotonic;
Components\Controls\Chart\ChartFilters.razor.cs (1)
17public required OtlpInstrumentType InstrumentType { get; set; }
Components\Controls\Chart\LiveSparklinesBase.cs (2)
299var chartData = instrument.Type == OtlpInstrumentType.Histogram 344if (instrument.Type == OtlpInstrumentType.Histogram)
Components\Controls\Chart\MeterOverview.razor.cs (8)
159private string? GetInstrumentTypeName(OtlpInstrumentType type) => type switch 161OtlpInstrumentType.Gauge => Loc[nameof(MetricsResources.MetricsInstrumentTypeGauge)].Value, 162OtlpInstrumentType.Sum => Loc[nameof(MetricsResources.MetricsInstrumentTypeCounter)].Value, 163OtlpInstrumentType.Histogram => Loc[nameof(MetricsResources.MetricsInstrumentTypeHistogram)].Value, 167private static Icon? GetInstrumentIcon(OtlpInstrumentType type) 171OtlpInstrumentType.Gauge => s_gaugeIcon, 172OtlpInstrumentType.Sum => s_counterIcon, 173OtlpInstrumentType.Histogram => s_histogramIcon,
Components\Controls\Chart\MetricInstrumentDataCache.cs (1)
50cached.Summary.Type != OtlpInstrumentType.Histogram;
Components\Controls\Chart\MetricTable.razor.cs (1)
267return _instrument?.Type == OtlpInstrumentType.Histogram;
Model\TelemetryExportService.cs (3)
503case OtlpInstrumentType.Gauge: 509case OtlpInstrumentType.Sum: 516case OtlpInstrumentType.Histogram:
Otlp\Model\OtlpInstrument.cs (2)
15public required OtlpInstrumentType Type { get; init; } 19/// Gets whether a <see cref="OtlpInstrumentType.Sum"/> only increases (a counter) rather than
Otlp\Storage\SqliteTelemetryRepository.Caching.cs (1)
679Type = (OtlpInstrumentType)record.InstrumentType,
Otlp\Storage\SqliteTelemetryRepository.Metrics.Writes.cs (5)
927private static OtlpInstrumentType MapMetricType(Metric.DataOneofCase dataCase) 931Metric.DataOneofCase.Gauge => OtlpInstrumentType.Gauge, 932Metric.DataOneofCase.Sum => OtlpInstrumentType.Sum, 933Metric.DataOneofCase.Histogram => OtlpInstrumentType.Histogram, 934_ => OtlpInstrumentType.Unsupported
Aspire.Dashboard.Components.Tests (15)
Controls\ChartFiltersTests.cs (5)
350[InlineData(OtlpInstrumentType.Sum, true, true)] 351[InlineData(OtlpInstrumentType.Sum, false, false)] 352[InlineData(OtlpInstrumentType.Gauge, false, false)] 353public async Task Render_Counter_ShowsChangePerIntervalOption(OtlpInstrumentType instrumentType, bool isCounter, bool expectOption) 387builder.Add(p => p.InstrumentType, OtlpInstrumentType.Sum);
Controls\PlotlyChartTests.cs (10)
40Type = OtlpInstrumentType.Histogram, 131Type = OtlpInstrumentType.Sum, 195Type = OtlpInstrumentType.Sum, 249Type = OtlpInstrumentType.Sum, 283[InlineData("ms", OtlpInstrumentType.Sum, false)] 284[InlineData("{request}", OtlpInstrumentType.Gauge, false)] 285[InlineData("{request}", OtlpInstrumentType.Sum, true)] 286public async Task UpdateDataAsync_SameInstrumentKeyWithDifferentUnitTypeOrMonotonicity_ReinitializesChart(string unit, OtlpInstrumentType type, bool isMonotonic) 295OtlpInstrumentSummary CreateInstrument(string instrumentUnit, OtlpInstrumentType instrumentType, bool instrumentIsMonotonic) => new OtlpInstrumentSummary 315await model.UpdateDataAsync(CreateInstrument("{request}", OtlpInstrumentType.Sum, instrumentIsMonotonic: false), [CreateDimension()], hasOverflow: false);
Aspire.Dashboard.Tests (12)
ChartDataCalculatorTests.cs (9)
415var cached = CreateInstrumentData([dimension], OtlpInstrumentType.Sum, OtlpAggregationTemporality.Delta); 1125var cached = CreateInstrumentData([cachedDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative); 1126var refreshed = CreateInstrumentData([refreshedDimension, newDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative); 1156var cached = CreateInstrumentData([cachedDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative); 1157var refreshed = CreateInstrumentData([refreshedDimension], OtlpInstrumentType.Gauge, OtlpAggregationTemporality.Cumulative); 1184CreateInstrumentData([cachedDimension], OtlpInstrumentType.Sum, OtlpAggregationTemporality.Delta), 1185CreateInstrumentData([refreshedDimension], OtlpInstrumentType.Sum, OtlpAggregationTemporality.Delta), 1216private static OtlpInstrumentData CreateInstrumentData(List<DimensionScope> dimensions, OtlpInstrumentType type, OtlpAggregationTemporality temporality) 1229IsMonotonic = type == OtlpInstrumentType.Sum,
Model\DefaultInstrumentUnitResolverTests.cs (1)
34Type = OtlpInstrumentType.Gauge,
Model\MetricPinStoreTests.cs (1)
170Type = OtlpInstrumentType.Sum,
TelemetryRepositoryTests\MetricsTests.cs (1)
500Assert.Equal(OtlpInstrumentType.Histogram, instrumentSummary.Type);