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