1 write to Name
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\Instrument.cs (1)
70Name = name ?? throw new ArgumentNullException(nameof(name));
59 references to Name
Interop.FunctionalTests (1)
Http2\Http2RequestTests.cs (1)
50instrument.Name == "kestrel.connection.duration")
Microsoft.AspNetCore.Hosting.Tests (1)
HostingApplicationDiagnosticsTests.cs (1)
184if (i.Meter.Scope == testMeterFactory && i.Meter.Name == HostingMetrics.MeterName && i.Name == "http.server.request.duration")
Microsoft.Extensions.Diagnostics (4)
Metrics\DebugConsoleMetricListener.cs (3)
37WriteLine($"{instrument.Meter.Name}-{instrument.Name} Started; Description: {instrument.Description}."); 45WriteLine($"{instrument.Meter.Name}-{instrument.Name} Stopped."); 64WriteLine($"{instrument.Meter.Name}-{instrument.Name} {measurement} {instrument.Unit}");
Metrics\ListenerSubscription.cs (1)
156&& !string.Equals(rule.InstrumentName, instrument.Name, StringComparison.OrdinalIgnoreCase))
Microsoft.Extensions.Diagnostics.Abstractions (7)
Metrics\InstrumentRule.cs (3)
16/// <para>- InstrumentName, an exact match. <see cref="Instrument.Name">Instrument.Name</see>.</para> 21/// <param name="instrumentName">The <see cref="Instrument.Name">Instrument.Name</see>.</param> 36/// Gets the <see cref="Instrument.Name">Instrument.Name</see>, an exact match.
Metrics\MetricsBuilderExtensions.Rules.cs (4)
29/// <param name="instrumentName">The <see cref="Instrument.Name"/>. A null value matches all instruments.</param> 51/// <param name="instrumentName">The <see cref="Instrument.Name"/>. A null value matches all instruments.</param> 73/// <param name="instrumentName">The <see cref="Instrument.Name"/>. A null value matches all instruments.</param> 95/// <param name="instrumentName">The <see cref="Instrument.Name"/>. A null value matches all instruments.</param>
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (32)
Linux\AcceptanceTest.cs (10)
370if (instrument.Name == ResourceUtilizationInstruments.ProcessCpuUtilization || 371instrument.Name == ResourceUtilizationInstruments.ProcessMemoryUtilization || 372instrument.Name == ResourceUtilizationInstruments.ContainerCpuRequestUtilization || 373instrument.Name == ResourceUtilizationInstruments.ContainerCpuLimitUtilization || 374instrument.Name == ResourceUtilizationInstruments.ContainerMemoryLimitUtilization) 386if (instrument.Name == ResourceUtilizationInstruments.ProcessCpuUtilization) 390else if (instrument.Name == ResourceUtilizationInstruments.ProcessMemoryUtilization) 394else if (instrument.Name == ResourceUtilizationInstruments.ContainerCpuLimitUtilization) 398else if (instrument.Name == ResourceUtilizationInstruments.ContainerCpuRequestUtilization) 402else if (instrument.Name == ResourceUtilizationInstruments.ContainerMemoryLimitUtilization)
Linux\LinuxCountersTests.cs (1)
109samples.Should().AllSatisfy(x => x.instrument.Name.Should().Be(ResourceUtilizationInstruments.SystemNetworkConnections));
Linux\LinuxUtilizationProviderTests.cs (20)
79Assert.Contains(samples, x => x.instrument.Name == ResourceUtilizationInstruments.ContainerCpuLimitUtilization); 80Assert.True(double.IsNaN(samples.Single(i => i.instrument.Name == ResourceUtilizationInstruments.ContainerCpuLimitUtilization).value)); 82Assert.Contains(samples, x => x.instrument.Name == ResourceUtilizationInstruments.ContainerCpuRequestUtilization); 83Assert.True(double.IsNaN(samples.Single(i => i.instrument.Name == ResourceUtilizationInstruments.ContainerCpuRequestUtilization).value)); 85Assert.Contains(samples, x => x.instrument.Name == ResourceUtilizationInstruments.ContainerMemoryLimitUtilization); 86Assert.Equal(0.5, samples.Single(i => i.instrument.Name == ResourceUtilizationInstruments.ContainerMemoryLimitUtilization).value); 88Assert.Contains(samples, x => x.instrument.Name == ResourceUtilizationInstruments.ProcessCpuUtilization); 89Assert.True(double.IsNaN(samples.Single(i => i.instrument.Name == ResourceUtilizationInstruments.ProcessCpuUtilization).value)); 91Assert.Contains(samples, x => x.instrument.Name == ResourceUtilizationInstruments.ProcessMemoryUtilization); 92Assert.Equal(0.5, samples.Single(i => i.instrument.Name == ResourceUtilizationInstruments.ProcessMemoryUtilization).value); 148Assert.Contains(samples, x => x.instrument.Name == ResourceUtilizationInstruments.ContainerCpuLimitUtilization); 149Assert.True(double.IsNaN(samples.Single(i => i.instrument.Name == ResourceUtilizationInstruments.ContainerCpuLimitUtilization).value)); 151Assert.Contains(samples, x => x.instrument.Name == ResourceUtilizationInstruments.ContainerCpuRequestUtilization); 152Assert.True(double.IsNaN(samples.Single(i => i.instrument.Name == ResourceUtilizationInstruments.ContainerCpuRequestUtilization).value)); 154Assert.Contains(samples, x => x.instrument.Name == ResourceUtilizationInstruments.ContainerMemoryLimitUtilization); 155Assert.Equal(1, samples.Single(i => i.instrument.Name == ResourceUtilizationInstruments.ContainerMemoryLimitUtilization).value); 157Assert.Contains(samples, x => x.instrument.Name == ResourceUtilizationInstruments.ProcessCpuUtilization); 158Assert.True(double.IsNaN(samples.Single(i => i.instrument.Name == ResourceUtilizationInstruments.ProcessCpuUtilization).value)); 160Assert.Contains(samples, x => x.instrument.Name == ResourceUtilizationInstruments.ProcessMemoryUtilization); 161Assert.Equal(1, samples.Single(i => i.instrument.Name == ResourceUtilizationInstruments.ProcessMemoryUtilization).value);
Windows\WindowsCountersTests.cs (1)
59samples.Should().AllSatisfy(x => x.instrument.Name.Should().Be("system.network.connections"));
Microsoft.Extensions.Diagnostics.Testing (3)
Metrics\MetricCollector.cs (3)
90Initialize(instrument => Equals(instrument.Meter.Scope, meterScope) && instrument.Meter.Name == meterName && instrument.Name == instrumentName); 105Initialize(instrument => ReferenceEquals(instrument.Meter, meter) && instrument.Name == instrumentName); 342? new(nameof(MetricCollector<T>), $"The metric collector instance for instrument '{_instrument.Name}' of meter '{_instrument.Meter.Name}' has been disposed.")
Microsoft.Extensions.Diagnostics.Testing.Tests (2)
Metrics\MetricCollectorTests.cs (2)
142using var collector = new MetricCollector<long>(scope, meter.Name, counter.Name, timeProvider); 143using var collector2 = new MetricCollector<long>(new object(), meter.Name, counter.Name, timeProvider);
System.Diagnostics.DiagnosticSource (9)
System\Diagnostics\Metrics\AggregationManager.cs (1)
107&& i.Name.Equals(instrumentName, StringComparison.OrdinalIgnoreCase));
System\Diagnostics\Metrics\MetricsEventSource.cs (8)
465beginInstrumentMeasurements: (i, state) => Parent.BeginInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 467endInstrumentMeasurements: (i, state) => Parent.EndInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 469instrumentPublished: (i, state) => Parent.InstrumentPublished(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 705Log.CounterRateValuePublished(sessionId, instrument.Meter.Name, instrument.Meter.Version, instrument.Name, instrument.Unit, Helpers.FormatTags(stats.Labels), 710Log.UpDownCounterRateValuePublished(sessionId, instrument.Meter.Name, instrument.Meter.Version, instrument.Name, instrument.Unit, Helpers.FormatTags(stats.Labels), 716Log.GaugeValuePublished(sessionId, instrument.Meter.Name, instrument.Meter.Version, instrument.Name, instrument.Unit, Helpers.FormatTags(stats.Labels), 721Log.GaugeValuePublished(sessionId, instrument.Meter.Name, instrument.Meter.Version, instrument.Name, instrument.Unit, Helpers.FormatTags(stats.Labels), 726Log.HistogramValuePublished(sessionId, instrument.Meter.Name, instrument.Meter.Version, instrument.Name, instrument.Unit, Helpers.FormatTags(stats.Labels), FormatQuantiles(histogramStats.Quantiles),