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