8 instantiations of OtlpInstrumentKey
Aspire.Dashboard (1)
Otlp\Model\OtlpInstrument.cs (1)
26
public OtlpInstrumentKey GetKey() =>
new
(Parent.Name, Name);
Aspire.Dashboard.Components.Tests (3)
Pages\MetricsTests.cs (3)
1406
Assert.Equal([new
OtlpInstrumentKey
("test-meter", "test-instrument-b")], Services.GetRequiredService<MetricPinStore>().GetPins());
1430
Services.GetRequiredService<MetricPinStore>().SetPinned(new
OtlpInstrumentKey
("test-meter", "test-instrument-b"), pinned: true);
1755
Services.GetRequiredService<MetricPinStore>().SetPinned(new
OtlpInstrumentKey
("test-meter2", "queue.length"), pinned: true);
Aspire.Dashboard.Tests (4)
Model\MetricPinStoreTests.cs (4)
20
private static readonly OtlpInstrumentKey s_duration =
new
("Microsoft.AspNetCore.Hosting", "http.server.request.duration");
21
private static readonly OtlpInstrumentKey s_heap =
new
("System.Runtime", "dotnet.gc.heap.total_allocated");
22
private static readonly OtlpInstrumentKey s_cpu =
new
("System.Runtime", "dotnet.process.cpu.time");
114
var unpinned = CreateInstrument(new
OtlpInstrumentKey
("System.Runtime", "dotnet.exceptions"));
23 references to OtlpInstrumentKey
Aspire.Dashboard (19)
Components\Controls\Chart\ChartBase.cs (1)
29
private
OtlpInstrumentKey
? _renderedInstrument;
Components\Controls\Chart\LiveSparklinesBase.cs (6)
34
private Dictionary<(ResourceKey,
OtlpInstrumentKey
), SparklineData> _sparklines = new();
47
private HashSet<(ResourceKey,
OtlpInstrumentKey
)>? _visibleInstruments;
50
private readonly HashSet<(ResourceKey,
OtlpInstrumentKey
)> _staleInstruments = new();
226
var refreshed = new List<((ResourceKey,
OtlpInstrumentKey
) Key, SparklineData Data)>(instruments.Count);
233
var sparklines = replaceAll ? new Dictionary<(ResourceKey,
OtlpInstrumentKey
), SparklineData>() : new Dictionary<(ResourceKey,
OtlpInstrumentKey
), SparklineData>(_sparklines);
Model\MetricPinStore.cs (10)
29
private readonly LocalStorageSetting<List<
OtlpInstrumentKey
>> _setting;
50
public IReadOnlyList<
OtlpInstrumentKey
> GetPins() => _setting.Read(pins => pins.ToArray());
63
public bool IsPinned(
OtlpInstrumentKey
key) => _setting.Read(pins => pins.Contains(key));
68
public void SetPinned(
OtlpInstrumentKey
key, bool pinned)
73
private static bool AddPin(List<
OtlpInstrumentKey
> pins,
OtlpInstrumentKey
key)
85
private static List<
OtlpInstrumentKey
> NormalizePins(List<
OtlpInstrumentKey
>? stored)
87
var pins = new List<
OtlpInstrumentKey
>();
88
foreach (
var
key in stored ?? [])
Otlp\Model\OtlpInstrument.cs (1)
26
public
OtlpInstrumentKey
GetKey() => new(Parent.Name, Name);
Serialization\DashboardJsonSerializerContext.cs (1)
42
[JsonSerializable(typeof(List<
OtlpInstrumentKey
>))]
Aspire.Dashboard.Tests (4)
Model\MetricPinStoreTests.cs (4)
20
private static readonly
OtlpInstrumentKey
s_duration = new("Microsoft.AspNetCore.Hosting", "http.server.request.duration");
21
private static readonly
OtlpInstrumentKey
s_heap = new("System.Runtime", "dotnet.gc.heap.total_allocated");
22
private static readonly
OtlpInstrumentKey
s_cpu = new("System.Runtime", "dotnet.process.cpu.time");
119
private static OtlpInstrumentSummary CreateInstrument(
OtlpInstrumentKey
key)