1 write to Name
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\Instrument.cs (1)
70
Name
= name ?? throw new ArgumentNullException(nameof(name));
59 references to Name
Interop.FunctionalTests (1)
Http2\Http2RequestTests.cs (1)
50
instrument.
Name
== "kestrel.connection.duration")
Microsoft.AspNetCore.Hosting.Tests (1)
HostingApplicationDiagnosticsTests.cs (1)
184
if (i.Meter.Scope == testMeterFactory && i.Meter.Name == HostingMetrics.MeterName && i.
Name
== "http.server.request.duration")
Microsoft.Extensions.Diagnostics (4)
Metrics\DebugConsoleMetricListener.cs (3)
37
WriteLine($"{instrument.Meter.Name}-{instrument.
Name
} Started; Description: {instrument.Description}.");
45
WriteLine($"{instrument.Meter.Name}-{instrument.
Name
} Stopped.");
64
WriteLine($"{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)
370
if (instrument.
Name
== ResourceUtilizationInstruments.ProcessCpuUtilization ||
371
instrument.
Name
== ResourceUtilizationInstruments.ProcessMemoryUtilization ||
372
instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuRequestUtilization ||
373
instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuLimitUtilization ||
374
instrument.
Name
== ResourceUtilizationInstruments.ContainerMemoryLimitUtilization)
386
if (instrument.
Name
== ResourceUtilizationInstruments.ProcessCpuUtilization)
390
else if (instrument.
Name
== ResourceUtilizationInstruments.ProcessMemoryUtilization)
394
else if (instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuLimitUtilization)
398
else if (instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuRequestUtilization)
402
else if (instrument.
Name
== ResourceUtilizationInstruments.ContainerMemoryLimitUtilization)
Linux\LinuxCountersTests.cs (1)
109
samples.Should().AllSatisfy(x => x.instrument.
Name
.Should().Be(ResourceUtilizationInstruments.SystemNetworkConnections));
Linux\LinuxUtilizationProviderTests.cs (20)
79
Assert.Contains(samples, x => x.instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuLimitUtilization);
80
Assert.True(double.IsNaN(samples.Single(i => i.instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuLimitUtilization).value));
82
Assert.Contains(samples, x => x.instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuRequestUtilization);
83
Assert.True(double.IsNaN(samples.Single(i => i.instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuRequestUtilization).value));
85
Assert.Contains(samples, x => x.instrument.
Name
== ResourceUtilizationInstruments.ContainerMemoryLimitUtilization);
86
Assert.Equal(0.5, samples.Single(i => i.instrument.
Name
== ResourceUtilizationInstruments.ContainerMemoryLimitUtilization).value);
88
Assert.Contains(samples, x => x.instrument.
Name
== ResourceUtilizationInstruments.ProcessCpuUtilization);
89
Assert.True(double.IsNaN(samples.Single(i => i.instrument.
Name
== ResourceUtilizationInstruments.ProcessCpuUtilization).value));
91
Assert.Contains(samples, x => x.instrument.
Name
== ResourceUtilizationInstruments.ProcessMemoryUtilization);
92
Assert.Equal(0.5, samples.Single(i => i.instrument.
Name
== ResourceUtilizationInstruments.ProcessMemoryUtilization).value);
148
Assert.Contains(samples, x => x.instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuLimitUtilization);
149
Assert.True(double.IsNaN(samples.Single(i => i.instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuLimitUtilization).value));
151
Assert.Contains(samples, x => x.instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuRequestUtilization);
152
Assert.True(double.IsNaN(samples.Single(i => i.instrument.
Name
== ResourceUtilizationInstruments.ContainerCpuRequestUtilization).value));
154
Assert.Contains(samples, x => x.instrument.
Name
== ResourceUtilizationInstruments.ContainerMemoryLimitUtilization);
155
Assert.Equal(1, samples.Single(i => i.instrument.
Name
== ResourceUtilizationInstruments.ContainerMemoryLimitUtilization).value);
157
Assert.Contains(samples, x => x.instrument.
Name
== ResourceUtilizationInstruments.ProcessCpuUtilization);
158
Assert.True(double.IsNaN(samples.Single(i => i.instrument.
Name
== ResourceUtilizationInstruments.ProcessCpuUtilization).value));
160
Assert.Contains(samples, x => x.instrument.
Name
== ResourceUtilizationInstruments.ProcessMemoryUtilization);
161
Assert.Equal(1, samples.Single(i => i.instrument.
Name
== ResourceUtilizationInstruments.ProcessMemoryUtilization).value);
Windows\WindowsCountersTests.cs (1)
59
samples.Should().AllSatisfy(x => x.instrument.
Name
.Should().Be("system.network.connections"));
Microsoft.Extensions.Diagnostics.Testing (3)
Metrics\MetricCollector.cs (3)
90
Initialize(instrument => Equals(instrument.Meter.Scope, meterScope) && instrument.Meter.Name == meterName && instrument.
Name
== instrumentName);
105
Initialize(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)
142
using var collector = new MetricCollector<long>(scope, meter.Name, counter.
Name
, timeProvider);
143
using 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)
465
beginInstrumentMeasurements: (i, state) => Parent.BeginInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.
Name
, i.GetType().Name, i.Unit, i.Description,
467
endInstrumentMeasurements: (i, state) => Parent.EndInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.
Name
, i.GetType().Name, i.Unit, i.Description,
469
instrumentPublished: (i, state) => Parent.InstrumentPublished(sessionId, i.Meter.Name, i.Meter.Version, i.
Name
, i.GetType().Name, i.Unit, i.Description,
705
Log.CounterRateValuePublished(sessionId, instrument.Meter.Name, instrument.Meter.Version, instrument.
Name
, instrument.Unit, Helpers.FormatTags(stats.Labels),
710
Log.UpDownCounterRateValuePublished(sessionId, instrument.Meter.Name, instrument.Meter.Version, instrument.
Name
, instrument.Unit, Helpers.FormatTags(stats.Labels),
716
Log.GaugeValuePublished(sessionId, instrument.Meter.Name, instrument.Meter.Version, instrument.
Name
, instrument.Unit, Helpers.FormatTags(stats.Labels),
721
Log.GaugeValuePublished(sessionId, instrument.Meter.Name, instrument.Meter.Version, instrument.
Name
, instrument.Unit, Helpers.FormatTags(stats.Labels),
726
Log.HistogramValuePublished(sessionId, instrument.Meter.Name, instrument.Meter.Version, instrument.
Name
, instrument.Unit, Helpers.FormatTags(stats.Labels), FormatQuantiles(histogramStats.Quantiles),