10 instantiations of OtlpInstrumentKey
Aspire.Dashboard (2)
Model\MetricPin.cs (1)
19
public OtlpInstrumentKey GetInstrumentKey() =>
new
(MeterName, InstrumentName);
Otlp\Model\OtlpInstrument.cs (1)
26
public OtlpInstrumentKey GetKey() =>
new
(Parent.Name, Name);
Aspire.Dashboard.Components.Tests (5)
Pages\MetricsTests.cs (5)
395
.Add(button => button.InstrumentKey, new
OtlpInstrumentKey
("test-meter", "requests"))
446
await Services.GetRequiredService<MetricPinStore>().SetPinnedAsync(new
OtlpInstrumentKey
("shared-meter", "requests"), ["api", "worker"], pinned: true);
868
var requests = new
OtlpInstrumentKey
("test-meter", "requests");
2013
await Services.GetRequiredService<MetricPinStore>().SetPinnedAsync(new
OtlpInstrumentKey
("test-meter", "test-instrument-b"), ["TestApp"], pinned: true);
2515
await Services.GetRequiredService<MetricPinStore>().SetPinnedAsync(new
OtlpInstrumentKey
("test-meter2", "queue.length"), ["TestApp"], pinned: true);
Aspire.Dashboard.Tests (3)
Model\MetricPinStoreTests.cs (3)
19
private static readonly OtlpInstrumentKey s_duration =
new
("Microsoft.AspNetCore.Hosting", "http.server.request.duration");
20
private static readonly OtlpInstrumentKey s_heap =
new
("System.Runtime", "dotnet.gc.heap.total_allocated");
21
private static readonly OtlpInstrumentKey s_cpu =
new
("System.Runtime", "dotnet.process.cpu.time");
20 references to OtlpInstrumentKey
Aspire.Dashboard (14)
Components\Controls\Chart\ChartBase.cs (1)
29
private
OtlpInstrumentKey
? _renderedInstrument;
Components\Controls\Chart\LiveSparklinesBase.cs (7)
34
private Dictionary<(ResourceKey,
OtlpInstrumentKey
), SparklineData> _sparklines = new();
47
private HashSet<(ResourceKey,
OtlpInstrumentKey
)>? _visibleInstruments;
50
private readonly HashSet<(ResourceKey,
OtlpInstrumentKey
)> _staleInstruments = new();
235
var refreshed = new List<((ResourceKey,
OtlpInstrumentKey
) Key, SparklineData Data)>(instruments.Count);
237
async Task<((ResourceKey,
OtlpInstrumentKey
) Key, SparklineData Data)> ReadAsync(OtlpInstrumentSummary instrument)
265
var sparklines = replaceAll ? new Dictionary<(ResourceKey,
OtlpInstrumentKey
), SparklineData>() : new Dictionary<(ResourceKey,
OtlpInstrumentKey
), SparklineData>(_sparklines);
Components\Controls\Chart\MetricPinButton.razor.cs (1)
35
public required
OtlpInstrumentKey
InstrumentKey { get; set; }
Model\MetricPin.cs (2)
19
public
OtlpInstrumentKey
GetInstrumentKey() => new(MeterName, InstrumentName);
25
public bool Matches(string resourceName,
OtlpInstrumentKey
key) =>
Model\MetricPinStore.cs (2)
76
public bool IsPinned(
OtlpInstrumentKey
key, IReadOnlyCollection<string> resourceNames) =>
83
internal Task<SettingUpdateResult> SetPinnedAsync(
OtlpInstrumentKey
key, IReadOnlyCollection<string> resourceNames, bool pinned)
Otlp\Model\OtlpInstrument.cs (1)
26
public
OtlpInstrumentKey
GetKey() => new(Parent.Name, Name);
Aspire.Dashboard.Components.Tests (1)
Pages\MetricsTests.cs (1)
868
var
requests = new OtlpInstrumentKey("test-meter", "requests");
Aspire.Dashboard.Tests (5)
Model\MetricPinStoreTests.cs (5)
19
private static readonly
OtlpInstrumentKey
s_duration = new("Microsoft.AspNetCore.Hosting", "http.server.request.duration");
20
private static readonly
OtlpInstrumentKey
s_heap = new("System.Runtime", "dotnet.gc.heap.total_allocated");
21
private static readonly
OtlpInstrumentKey
s_cpu = new("System.Runtime", "dotnet.process.cpu.time");
197
private static MetricPin Pin(string resourceName,
OtlpInstrumentKey
key) => new(resourceName, key.MeterName, key.InstrumentName);
199
private static OtlpInstrumentSummary CreateInstrument(string resourceName,
OtlpInstrumentKey
key)