1 write to Meter
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\Instrument.cs (1)
69Meter = meter ?? throw new ArgumentNullException(nameof(meter));
53 references to Meter
Interop.FunctionalTests (2)
Http2\Http2RequestTests.cs (2)
48if (instrument.Meter.Scope == meterFactory && 49instrument.Meter.Name == "Microsoft.AspNetCore.Server.Kestrel" &&
Microsoft.AspNetCore.Hosting.Tests (2)
HostingApplicationDiagnosticsTests.cs (2)
184if (i.Meter.Scope == testMeterFactory && i.Meter.Name == HostingMetrics.MeterName && i.Name == "http.server.request.duration")
Microsoft.Extensions.Diagnostics (8)
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 (5)
135&& IsMoreSpecific(rule, best, isLocalScope: instrument.Meter.Scope == _meterFactory)) 161if (!(rule.Scopes.HasFlag(MeterScope.Global) && instrument.Meter.Scope == null) 162&& !(rule.Scopes.HasFlag(MeterScope.Local) && instrument.Meter.Scope == meterFactory)) 194if (!instrument.Meter.Name.AsSpan().StartsWith(prefix, StringComparison.OrdinalIgnoreCase) || 195!instrument.Meter.Name.AsSpan().EndsWith(suffix, StringComparison.OrdinalIgnoreCase))
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (8)
Linux\AcceptanceTest.cs (1)
364if (!ReferenceEquals(instrument.Meter.Scope, meterScope))
Linux\LinuxCountersTests.cs (1)
93if (ReferenceEquals(meter, instrument.Meter))
Linux\LinuxUtilizationProviderTests.cs (4)
58if (ReferenceEquals(meter, instrument.Meter)) 68if (ReferenceEquals(meter, instrument.Meter)) 127if (ReferenceEquals(meter, instrument.Meter)) 137if (ReferenceEquals(meter, instrument.Meter))
Windows\WindowsCountersTests.cs (2)
43if (ReferenceEquals(meter, instrument.Meter)) 85if (ReferenceEquals(meter, instrument.Meter))
Microsoft.Extensions.Diagnostics.Testing (4)
Metrics\MetricCollector.cs (4)
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.Resilience.PerformanceTests (1)
MetricsUtil.cs (1)
18if (instrument.Meter.Name is "Polly")
System.Diagnostics.DiagnosticSource (28)
System\Diagnostics\Metrics\AggregationManager.cs (3)
91Include(i => i.Meter.Name.Equals(meterName, StringComparison.OrdinalIgnoreCase)); 101Include(i => i.Meter.Name.StartsWith(meterNamePrefix, StringComparison.OrdinalIgnoreCase)); 106Include(i => i.Meter.Name.Equals(meterName, StringComparison.OrdinalIgnoreCase)
System\Diagnostics\Metrics\Instrument.cs (2)
95if (Meter.Disposed || !Meter.AddInstrument(this))
System\Diagnostics\Metrics\MeterListener.cs (1)
76if (instrument is not null && !_disposed && !instrument.Meter.Disposed)
System\Diagnostics\Metrics\MetricsEventSource.cs (22)
465beginInstrumentMeasurements: (i, state) => Parent.BeginInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 466Helpers.FormatTags(i.Tags), Helpers.FormatTags(i.Meter.Tags), Helpers.FormatObjectHash(i.Meter.Scope), state.ID), 467endInstrumentMeasurements: (i, state) => Parent.EndInstrumentReporting(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 468Helpers.FormatTags(i.Tags), Helpers.FormatTags(i.Meter.Tags), Helpers.FormatObjectHash(i.Meter.Scope), state.ID), 469instrumentPublished: (i, state) => Parent.InstrumentPublished(sessionId, i.Meter.Name, i.Meter.Version, i.Name, i.GetType().Name, i.Unit, i.Description, 470Helpers.FormatTags(i.Tags), Helpers.FormatTags(i.Meter.Tags), Helpers.FormatObjectHash(i.Meter.Scope), state is null ? 0 : state.ID), 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),