2 types derived from Meter
Microsoft.Extensions.Diagnostics (1)
Metrics\DefaultMeterFactory.cs (1)
90internal sealed class FactoryMeter : Meter
System.Net.Http (1)
System\Net\Http\Metrics\MetricsHandler.cs (1)
150private sealed class SharedMeter : Meter
68 instantiations of Meter
InMemory.FunctionalTests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Interop.FunctionalTests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Diagnostics (1)
DummyMeterFactory.cs (1)
10public Meter Create(MeterOptions options) => new Meter(options);
Microsoft.AspNetCore.Diagnostics.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.HeaderParsing.Tests (8)
HeaderParsingFeatureTests.cs (8)
43using var meter = new Meter(nameof(Parses_header)); 60using var meter = new Meter(nameof(Parses_multiple_headers)); 86using var meter = new Meter(nameof(Parses_with_late_binding)); 104using var meter = new Meter(nameof(TryParse_returns_false_on_header_not_found)); 117using var meter = new Meter(nameof(TryParse_returns_default_on_header_not_found)); 136using var meter = new Meter(nameof(TryParse_returns_false_on_error)); 160using var meter = new Meter(nameof(Dispose_resets_state_and_returns_to_pool)); 192using var meter = new Meter(nameof(CachingWorks));
Microsoft.AspNetCore.Hosting.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Http.Connections.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.RateLimiting.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Routing.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
KestrelServer.cs (1)
73public Meter Create(MeterOptions options) => new Meter(options);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (2)
TelemetryHealthChecksPublisherTests.cs (2)
86using var meter = new Meter(nameof(PublishAsync)); 131using var meter = new Meter(nameof(Ctor_ThrowsWhenOptionsValueNull));
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (13)
Helpers\TestMeterFactory.cs (1)
16var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object?>>(), scope: this);
Linux\LinuxCountersTests.cs (1)
80using var meter = new Meter(nameof(LinuxNetworkMetrics));
Linux\LinuxUtilizationProviderTests.cs (3)
32using var meter = new Meter(nameof(Provider_Registers_Instruments)); 102using var meter = new Meter(nameof(Provider_Registers_Instruments_CgroupV2)); 170using var meter = new Meter(nameof(Provider_EmitsLogRecord));
Windows\WindowsContainerSnapshotProviderTests.cs (3)
42using var meter = new Meter(nameof(WindowsContainerSnapshotProvider)); 213using var meter = new Meter(nameof(SnapshotProvider_EmitsCpuMetrics)); 276using var meter = new Meter(nameof(SnapshotProvider_EmitsMemoryMetrics));
Windows\WindowsCountersTests.cs (2)
30using var meter = new Meter(nameof(WindowsCounters_Registers_Instruments)); 72using var meter = new Meter(nameof(WindowsCounters_Got_Unsuccessful));
Windows\WindowsSnapshotProviderTests.cs (3)
34using var meter = new Meter(nameof(BasicConstructor)); 80using var meter = new Meter(nameof(SnapshotProvider_EmitsCpuMetrics)); 115using var meter = new Meter(nameof(SnapshotProvider_EmitsMemoryMetrics));
Microsoft.Extensions.Diagnostics.Testing.Tests (24)
Metrics\MeasurementExtensionsTests.cs (11)
17using var meter = new Meter(Guid.NewGuid().ToString()); 42using var meter = new Meter(Guid.NewGuid().ToString()); 67using var meter = new Meter(Guid.NewGuid().ToString()); 95using var meter = new Meter(Guid.NewGuid().ToString()); 126using var meter = new Meter(Guid.NewGuid().ToString()); 143using var meter = new Meter(Guid.NewGuid().ToString()); 160using var meter = new Meter(Guid.NewGuid().ToString()); 177using var meter = new Meter(Guid.NewGuid().ToString()); 194using var meter = new Meter(Guid.NewGuid().ToString()); 211using var meter = new Meter(Guid.NewGuid().ToString()); 228using var meter = new Meter(Guid.NewGuid().ToString());
Metrics\MetricCollectorTests.cs (13)
21Assert.Throws<ArgumentNullException>(() => new MetricCollector<long>(new Meter(Guid.NewGuid().ToString()), null!)); 25Assert.Throws<ArgumentException>(() => new MetricCollector<long>(new Meter(Guid.NewGuid().ToString()), string.Empty)); 33using var meter = new Meter(Guid.NewGuid().ToString()); 48using var meter = new Meter(Guid.NewGuid().ToString()); 94using var meter = new Meter(Guid.NewGuid().ToString()); 140using var meter = new Meter(Guid.NewGuid().ToString(), null, null, scope); 188using var meter = new Meter(Guid.NewGuid().ToString()); 241using var meter = new Meter(Guid.NewGuid().ToString()); 279using var meter = new Meter(Guid.NewGuid().ToString()); 305using var meter = new Meter(Guid.NewGuid().ToString()); 337using var meter = new Meter(Guid.NewGuid().ToString()); 352using var meter = new Meter(Guid.NewGuid().ToString()); 390using var meter = new Meter(Guid.NewGuid().ToString());
Microsoft.Gen.Metrics.Generated.Tests (3)
MetricTests.cs (3)
25_meter = new Meter(_meterName); 208using var meter2 = new Meter(_meterName + "2"); 227using var meter2 = new Meter(_meterName);
Sockets.BindTests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
Sockets.FunctionalTests (1)
src\Shared\Metrics\TestMeterFactory.cs (1)
15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\RuntimeMetrics.cs (1)
16private static readonly Meter s_meter = new(MeterName);
System.Net.NameResolution (1)
System\Net\NameResolutionMetrics.cs (1)
13private static readonly Meter s_meter = new("System.Net.NameResolution");
System.Net.Quic (1)
System\Net\Quic\NetEventSource.Quic.Counters.cs (1)
17private static readonly Meter s_meter = new Meter("Private.InternalDiagnostics.System.Net.Quic.MsQuic");
346 references to Meter
Aspire.Confluent.Kafka (1)
ConfluentKafkaMetrics.cs (1)
11private readonly Meter _meter;
InMemory.FunctionalTests (5)
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Interop.FunctionalTests (5)
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Microsoft.AspNetCore.Diagnostics (2)
DiagnosticsMetrics.cs (1)
17private readonly Meter _meter;
DummyMeterFactory.cs (1)
10public Meter Create(MeterOptions options) => new Meter(options);
Microsoft.AspNetCore.Diagnostics.Tests (10)
ExceptionHandlerMiddlewareTest.cs (5)
215var meter = meterFactory.Meters.Single(); 238var meter = meterFactory.Meters.Single(); 260var meter = meterFactory.Meters.Single(); 285var meter = meterFactory.Meters.Single(); 436var meter = meterFactory.Meters.Single();
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Microsoft.AspNetCore.HeaderParsing (3)
HeaderParsingMetrics.cs (1)
18var meter = meterFactory.Create(MeterName);
Metric.cs (2)
12public static partial ParsingErrorCounter CreateParsingErrorCounter(Meter meter); 15public static partial CacheAccessCounter CreateCacheAccessCounter(Meter meter);
Microsoft.AspNetCore.HeaderParsing.Tests (9)
HeaderParsingFeatureTests.cs (9)
43using var meter = new Meter(nameof(Parses_header)); 60using var meter = new Meter(nameof(Parses_multiple_headers)); 86using var meter = new Meter(nameof(Parses_with_late_binding)); 104using var meter = new Meter(nameof(TryParse_returns_false_on_header_not_found)); 117using var meter = new Meter(nameof(TryParse_returns_default_on_header_not_found)); 136using var meter = new Meter(nameof(TryParse_returns_false_on_error)); 160using var meter = new Meter(nameof(Dispose_resets_state_and_returns_to_pool)); 192using var meter = new Meter(nameof(CachingWorks)); 215private static HeaderParsingMetrics GetMockedMetrics(Meter meter)
Microsoft.AspNetCore.Hosting (1)
Internal\HostingMetrics.cs (1)
16private readonly Meter _meter;
Microsoft.AspNetCore.Hosting.Tests (8)
HostingMetricsTests.cs (3)
26var meter = meterFactory.Meters.Single(); 127var meter = meterFactory.Meters.Single(); 160var meter = meterFactory.Meters.Single();
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionsMetrics.cs (1)
25private readonly Meter _meter;
Microsoft.AspNetCore.Http.Connections.Tests (5)
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Microsoft.AspNetCore.RateLimiting (1)
RateLimitingMetrics.cs (1)
15private readonly Meter _meter;
Microsoft.AspNetCore.RateLimiting.Tests (10)
RateLimitingMetricsTests.cs (5)
34var meter = meterFactory.Meters.Single(); 80var meter = meterFactory.Meters.Single(); 139var meter = meterFactory.Meters.Single(); 194var meter = meterFactory.Meters.Single(); 269var meter = meterFactory.Meters.Single();
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Microsoft.AspNetCore.Routing (1)
RoutingMetrics.cs (1)
16private readonly Meter _meter;
Microsoft.AspNetCore.Routing.Microbenchmarks (5)
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Microsoft.AspNetCore.Routing.Tests (9)
RoutingMetricsTests.cs (4)
36var meter = meterFactory.Meters.Single(); 70var meter = meterFactory.Meters.Single(); 97var meter = meterFactory.Meters.Single(); 121var meter = meterFactory.Meters.Single();
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Infrastructure\KestrelMetrics.cs (1)
28private readonly Meter _meter;
KestrelServer.cs (1)
73public Meter Create(MeterOptions options) => new Meter(options);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (5)
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Microsoft.AspNetCore.Server.Kestrel.Tests (5)
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Microsoft.Extensions.Diagnostics (3)
Metrics\Configuration\MetricsBuilderConfigurationExtensions.cs (1)
20/// which <see cref="Meter">Meters</see>, <see cref="Instrument">Instruments</see>, and <see cref="IMetricsListener">IMetricsListeners</see> are enabled.
Metrics\DefaultMeterFactory.cs (2)
19public Meter Create(MeterOptions options) 42foreach (Meter meter in meterList)
Microsoft.Extensions.Diagnostics.Abstractions (20)
Metrics\InstrumentRule.cs (4)
15/// <para>- MeterName, either an exact match, or the longest prefix match. See <see cref="Meter.Name">Meter.Name</see>.</para> 20/// <param name="meterName">The <see cref="Meter.Name">Meter.Name</see> or prefix.</param> 28/// Gets the <see cref="Meter.Name">Meter.Name</see>, either an exact match or the longest prefix match. Only full segment matches are considered. 55/// This property is used to distinguish between meters created via <see cref="Meter"/> constructors (<see cref="MeterScope.Global"/>)
Metrics\MeterScope.cs (4)
10/// Represents scopes used by <see cref="InstrumentRule"/> to distinguish between meters created via <see cref="Meter"/> constructors (<see cref="Global"/>) 22/// Indicates <see cref="Meter"/> instances created via <see cref="Meter"/> constructors. 27/// Indicates <see cref="Meter"/> instances created via Dependency Injection with <see cref="IMeterFactory.Create(MeterOptions)"/>.
Metrics\MetricsBuilderExtensions.Rules.cs (12)
19/// <param name="meterName">The <see cref="Meter.Name"/> or prefix. A null value matches all meters.</param> 25/// Enables a specified <see cref="Instrument"/> for the given <see cref="Meter"/> and <see cref="IMetricsListener"/>. 28/// <param name="meterName">The <see cref="Meter.Name"/> or prefix. A null value matches all meters.</param> 41/// <param name="meterName">The <see cref="Meter.Name"/> or prefix. A null value matches all meters.</param> 47/// Enables a specified <see cref="Instrument"/> for the given <see cref="Meter"/> and <see cref="IMetricsListener"/>. 50/// <param name="meterName">The <see cref="Meter.Name"/> or prefix. A null value matches all meters.</param> 63/// <param name="meterName">The <see cref="Meter.Name"/> or prefix. A null value matches all meters.</param> 69/// Disables a specified <see cref="Instrument"/> for the given <see cref="Meter"/> and <see cref="IMetricsListener"/>. 72/// <param name="meterName">The <see cref="Meter.Name"/> or prefix. A null value matches all meters.</param> 85/// <param name="meterName">The <see cref="Meter.Name"/> or prefix. A null value matches all meters.</param> 91/// Disables a specified <see cref="Instrument"/> for the given <see cref="Meter"/> and <see cref="IMetricsListener"/>. 94/// <param name="meterName">The <see cref="Meter.Name"/> or prefix. A null value matches all meters.</param>
Microsoft.Extensions.Diagnostics.HealthChecks.Common (3)
HealthCheckMetrics.cs (1)
16var meter = meterFactory.Create("Microsoft.Extensions.Diagnostics.HealthChecks");
Metric.cs (2)
12public static partial HealthCheckReportCounter CreateHealthCheckReportCounter(Meter meter); 15public static partial UnhealthyHealthCheckCounter CreateUnhealthyHealthCheckCounter(Meter meter);
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (3)
TelemetryHealthChecksPublisherTests.cs (3)
86using var meter = new Meter(nameof(PublishAsync)); 131using var meter = new Meter(nameof(Ctor_ThrowsWhenOptionsValueNull)); 169private static HealthCheckMetrics GetMockedMetrics(Meter meter)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (3)
Windows\Network\WindowsNetworkMetrics.cs (1)
22var meter = meterFactory.Create(nameof(ResourceMonitoring));
Windows\WindowsContainerSnapshotProvider.cs (1)
108var meter = meterFactory.Create(ResourceUtilizationInstruments.MeterName);
Windows\WindowsSnapshotProvider.cs (1)
84var meter = meterFactory.Create(ResourceUtilizationInstruments.MeterName);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (21)
Helpers\TestMeterFactory.cs (6)
12public List<Meter> Meters { get; } = new List<Meter>(); 14public Meter Create(MeterOptions options) 16var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object?>>(), scope: this); 22public Meter Create(string name) 34foreach (var meter in Meters)
Linux\LinuxCountersTests.cs (1)
80using var meter = new Meter(nameof(LinuxNetworkMetrics));
Linux\LinuxUtilizationProviderTests.cs (4)
32using var meter = new Meter(nameof(Provider_Registers_Instruments)); 102using var meter = new Meter(nameof(Provider_Registers_Instruments_CgroupV2)); 170using var meter = new Meter(nameof(Provider_EmitsLogRecord)); 205var meter = meterFactory.Meters.Single();
Windows\WindowsContainerSnapshotProviderTests.cs (4)
42using var meter = new Meter(nameof(WindowsContainerSnapshotProvider)); 213using var meter = new Meter(nameof(SnapshotProvider_EmitsCpuMetrics)); 276using var meter = new Meter(nameof(SnapshotProvider_EmitsMemoryMetrics)); 344var meter = meterFactory.Meters.Single();
Windows\WindowsCountersTests.cs (2)
30using var meter = new Meter(nameof(WindowsCounters_Registers_Instruments)); 72using var meter = new Meter(nameof(WindowsCounters_Got_Unsuccessful));
Windows\WindowsSnapshotProviderTests.cs (4)
34using var meter = new Meter(nameof(BasicConstructor)); 80using var meter = new Meter(nameof(SnapshotProvider_EmitsCpuMetrics)); 115using var meter = new Meter(nameof(SnapshotProvider_EmitsMemoryMetrics)); 168var meter = meterFactory.Meters.Single();
Microsoft.Extensions.Diagnostics.Testing (1)
Metrics\MetricCollector.cs (1)
99public MetricCollector(Meter meter, string instrumentName, TimeProvider? timeProvider = null)
Microsoft.Extensions.Diagnostics.Testing.Tests (22)
Metrics\MeasurementExtensionsTests.cs (11)
17using var meter = new Meter(Guid.NewGuid().ToString()); 42using var meter = new Meter(Guid.NewGuid().ToString()); 67using var meter = new Meter(Guid.NewGuid().ToString()); 95using var meter = new Meter(Guid.NewGuid().ToString()); 126using var meter = new Meter(Guid.NewGuid().ToString()); 143using var meter = new Meter(Guid.NewGuid().ToString()); 160using var meter = new Meter(Guid.NewGuid().ToString()); 177using var meter = new Meter(Guid.NewGuid().ToString()); 194using var meter = new Meter(Guid.NewGuid().ToString()); 211using var meter = new Meter(Guid.NewGuid().ToString()); 228using var meter = new Meter(Guid.NewGuid().ToString());
Metrics\MetricCollectorTests.cs (11)
33using var meter = new Meter(Guid.NewGuid().ToString()); 48using var meter = new Meter(Guid.NewGuid().ToString()); 94using var meter = new Meter(Guid.NewGuid().ToString()); 140using var meter = new Meter(Guid.NewGuid().ToString(), null, null, scope); 188using var meter = new Meter(Guid.NewGuid().ToString()); 241using var meter = new Meter(Guid.NewGuid().ToString()); 279using var meter = new Meter(Guid.NewGuid().ToString()); 305using var meter = new Meter(Guid.NewGuid().ToString()); 337using var meter = new Meter(Guid.NewGuid().ToString()); 352using var meter = new Meter(Guid.NewGuid().ToString()); 390using var meter = new Meter(Guid.NewGuid().ToString());
Microsoft.Gen.Metrics.Generated.Tests (90)
MetricTests.cs (3)
19private readonly Meter _meter; 208using var meter2 = new Meter(_meterName + "2"); 227using var meter2 = new Meter(_meterName);
test\Generators\Microsoft.Gen.Metrics\TestClasses\AttributedWithoutNamespace.cs (2)
13public static partial NoNamespaceCounterInstrument CreatePublicCounter(Meter meter); 16public static partial NoNamespaceHistogramInstrument CreatePublicHistogram(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\CounterTestExtensions.cs (36)
12public static partial GenericIntCounter0D CreateGenericIntCounter0D(Meter meter); 15public static partial GenericIntCounterExt0D CreateGenericIntCounterExt0D(this Meter meter); 18public static partial Counter0D CreateCounter0D(Meter meter); 21public static partial MyNamedCounter CreateCounterDifferentName(Meter meter); 24public static partial CounterExt0D CreateCounterExt0D(this Meter meter); 27public static partial GenericIntCounter1D CreateGenericIntCounter1D(Meter meter); 30public static partial GenericIntCounterExt1D CreateGenericIntCounterExt1D(this Meter meter); 33public static partial GenericFloatCounter1D CreateGenericFloatCounter1D(Meter meter); 36public static partial GenericFloatCounterExt1D CreateGenericFloatCounterExt1D(this Meter meter); 39public static partial Counter2D CreateCounter2D(Meter meter); 42public static partial CounterExt2D CreateCounterExt2D(this Meter meter); 45public static partial Counter3D CreateCounter3D(Meter meter); 48public static partial CounterExt3D CreateCounterExt3D(this Meter meter); 51public static partial Counter4D CreateCounter4D(Meter meter); 54public static partial CounterExt4D CreateCounterExt4D(this Meter meter); 57public static partial CounterS0D2 CreateCounterS0D2(Meter meter); 60public static partial CounterExtS0D2 CreateCounterExtS0D2(this Meter meter); 63public static partial CounterS1D1 CreateCounterS1D1(Meter meter); 66public static partial CounterExtS1D1 CreateCounterExtS1D1(this Meter meter); 69public static partial CounterS3D2 CreateCounterS3D2(Meter meter); 72public static partial CounterExtS3D2 CreateCounterExtS3D2(this Meter meter); 75public static partial CounterS5D5 CreateCounterS5D5(Meter meter); 78public static partial CounterExtS5D5 CreateCounterExtS5D5(this Meter meter); 81public static partial TestCounter CreateTestCounter(Meter meter); 84public static partial TestCounterExt CreateTestCounterExt(this Meter meter); 87public static partial CounterWithVariableParams CreateCounterWithVariableParams(Meter meter); 90public static partial CounterExtWithVariableParams CreateCounterExtWithVariableParams(this Meter meter); 93public static partial CounterX CreateCounterX(Meter meter); 96public static partial CounterExtX CreateCounterExtX(this Meter meter); 99public static partial CounterY CreateCounterY(Meter meter); 102public static partial CounterExtY CreateCounterExtY(this Meter meter); 105public static partial StrongTypeDecimalCounter CreateStrongTypeDecimalCounter(Meter meter); 108public static partial StrongTypeDecimalCounterExt CreateStrongTypeDecimalCounterExt(this Meter meter); 111public static partial StructTypeCounter CreateCounterStructType(Meter meter); 114public static partial StructTypeCounterExt CreateCounterStructTypeExt(this Meter meter); 117public static partial RecordClassTypeCounter CreateCounterRecordClassType(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\FileScopedNamespaceExtensions.cs (2)
12public static partial FileScopedNamespaceCounter CreateCounter(Meter meter); 15public static partial FileScopedNamespaceGenericDoubleCounter CreateGenericDoubleCounter(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\HistogramTestExtensions.cs (30)
15public static partial Histogram0D CreateHistogram0D(Meter meter); 18public static partial GenericIntHistogram0D CreateGenericIntHistogram0D(Meter meter); 21public static partial HistogramExt0D CreateHistogramExt0D(this Meter meter); 24public static partial GenericIntHistogramExt0D CreateGenericIntHistogramExt0D(this Meter meter); 27public static partial Histogram1D CreateHistogram1D(Meter meter); 30public static partial HistogramExt1D CreateHistogramExt1D(this Meter meter); 33public static partial Histogram2D CreateHistogram2D(Meter meter); 36public static partial GenericIntHistogram2D CreateGenericIntHistogram2D(Meter meter); 39public static partial GenericIntHistogramExt2D CreateGenericIntHistogramExt2D(this Meter meter); 42public static partial HistogramExt2D CreateHistogramExt2D(this Meter meter); 45public static partial Histogram3D CreateHistogram3D(Meter meter); 48public static partial HistogramExt3D CreateHistogramExt3D(this Meter meter); 51public static partial Histogram4D CreateHistogram4D(Meter meter); 54public static partial HistogramExt4D CreateHistogramExt4D(this Meter meter); 57public static partial HistogramS0D2 CreateHistogramS0D2(Meter meter); 60public static partial HistogramExtS0D2 CreateHistogramExtS0D2(this Meter meter); 63public static partial HistogramS1D1 CreateHistogramS1D1(Meter meter); 66public static partial HistogramExtS1D1 CreateHistogramExtS1D1(this Meter meter); 69public static partial HistogramS3D2 CreateHistogramS3D2(Meter meter); 72public static partial HistogramExtS3D2 CreateHistogramExtS3D2(this Meter meter); 75public static partial HistogramS5D5 CreateHistogramS5D5(Meter meter); 78public static partial HistogramExtS5D5 CreateHistogramExtS5D5(this Meter meter); 81public static partial TestHistogram CreateTestHistogram(Meter meter); 84public static partial TestHistogramExt CreateTestHistogramExt(this Meter meter); 87public static partial HistogramWithVariableParams CreateHistogramWithVariableParams(Meter meter); 90public static partial HistogramExtWithVariableParams CreateHistogramExtWithVariableParams(this Meter meter); 93public static partial StrongTypeHistogram CreateHistogramStrongType(Meter meter); 96public static partial StrongTypeHistogramExt CreateHistogramExtStrongType(this Meter meter); 99public static partial StructTypeHistogram CreateHistogramStructType(Meter meter); 102public static partial StructTypeHistogramExt CreateHistogramExtStructType(this Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\MetricRecordClassTestExtensions.cs (1)
12public static partial CounterFromRecordClass CreateCounterFromRecordClass(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\MetricRecordStructTestExtensions.cs (1)
12public static partial CounterFromRecordStruct CreateCounterFromRecordStruct(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\MetricStructTestExtensions.cs (1)
12public static partial CounterFromStruct CreateCounterFromStruct(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\NestedClassMetrics.cs (4)
17public static partial NestedClassCounter CreateCounterInNestedClass(Meter meter); 20public static partial NestedClassHistogram CreateHistogramInNestedClass(Meter meter); 28public static partial MultiLevelNestedClassCounter CreateCounterInMultiLevelNestedClass(Meter meter); 31public static partial MultiLevelNestedClassHistogram CreateHistogramInMultiLevelNestedClass(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\NestedRecordClassMetrics.cs (2)
17public static partial NestedRecordClassCounter CreateCounterInNestedRecordClass(Meter meter); 20public static partial NestedRecordClassHistogram CreateHistogramInNestedRecordClass(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\NestedRecordStructMetrics.cs (2)
17public static partial NestedRecordStructCounter CreateCounterInNestedRecordStruct(Meter meter); 20public static partial NestedRecordStructHistogram CreateHistogramInNestedRecordStruct(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\NestedStructMetrics.cs (2)
17public static partial NestedStructCounter CreateCounterInNestedStruct(Meter meter); 20public static partial NestedStructHistogram CreateHistogramInNestedStruct(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\OverlappingNamesTestExtensions.cs (2)
17public static partial OverlappingNamesCounter CreateOverlappingNamesCounter(Meter meter); 20public static partial OverlappingNamesHistogram CreateOverlappingNamesHistogram(Meter meter);
test\Generators\Microsoft.Gen.Metrics\TestClasses\Public.cs (2)
15public static partial PublicCounter CreatePublicCounter(Meter meter); 18public static partial PublicHistogram CreatePublicHistogram(Meter meter);
Microsoft.Gen.Metrics.Unit.Tests (2)
EmitterTests.cs (1)
33Assembly.GetAssembly(typeof(Meter))!,
ParserTests.cs (1)
778Assembly.GetAssembly(typeof(Meter))!,
Microsoft.Gen.MetricsReports.Unit.Tests (1)
GeneratorTests.cs (1)
153Assembly.GetAssembly(typeof(Meter))!,
Sockets.BindTests (5)
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Sockets.FunctionalTests (5)
src\Shared\Metrics\TestMeterFactory.cs (5)
11public List<Meter> Meters { get; } = new List<Meter>(); 13public Meter Create(MeterOptions options) 15var meter = new Meter(options.Name, options.Version, Array.Empty<KeyValuePair<string, object>>(), scope: this); 22foreach (var meter in Meters)
Stress.ApiService (1)
TestMetrics.cs (1)
13private readonly Meter _meter;
System.Diagnostics.DiagnosticSource (63)
System\Diagnostics\Metrics\Counter.cs (2)
18internal Counter(Meter meter, string name, string? unit, string? description) : this(meter, name, unit, description, null) 22internal Counter(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\Gauge.cs (2)
16internal Gauge(Meter meter, string name, string? unit, string? description) : this(meter, name, unit, description, null) 20internal Gauge(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\Histogram.cs (3)
11/// Use <see cref="Meter.CreateHistogram(string, string?, string?)" /> method to create the Histogram object. 18internal Histogram(Meter meter, string name, string? unit, string? description) 23internal Histogram(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags, InstrumentAdvice<T>? advice)
System\Diagnostics\Metrics\IMeterFactory.cs (5)
9/// A factory for creating <see cref="Meter"/> instances. 21/// Creates a new <see cref="Meter"/> instance. 24/// <returns>A new <see cref="Meter"/> instance.</returns> 26/// The <see cref="Meter"/> instance returned by this method should be cached by the factory and returned for subsequent requests for a meter with the same parameters (name, version, and tags). 28Meter Create(MeterOptions options);
System\Diagnostics\Metrics\Instrument.common.cs (4)
28protected Instrument(Meter meter, string name) 41protected Instrument(Meter meter, string name, string? unit, string? description) 55protected Instrument(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) 70Meter meter,
System\Diagnostics\Metrics\Instrument.cs (5)
36protected Instrument(Meter meter, string name) 49protected Instrument(Meter meter, string name, string? unit, string? description) 63Meter meter, 87if (!Meter.IsSupported) 115public Meter Meter { get; }
System\Diagnostics\Metrics\Meter.cs (3)
18private static readonly List<Meter> s_allMeters = new List<Meter>(); 605foreach (Meter meter in s_allMeters)
System\Diagnostics\Metrics\MeterFactoryExtensions.cs (8)
10/// Extension methods for <see cref="Meter" /> and <see cref="IMeterFactory" />. 15/// Creates a <see cref="Meter" /> with the specified <paramref name="name" />, <paramref name="version" />, and <paramref name="tags" />. 17/// <param name="meterFactory">The <see cref="IMeterFactory" /> to use to create the <see cref="Meter" />.</param> 18/// <param name="name">The name of the <see cref="Meter" />.</param> 19/// <param name="version">The version of the <see cref="Meter" />.</param> 20/// <param name="tags">The tags to associate with the <see cref="Meter" />.</param> 21/// <returns>A <see cref="Meter" /> with the specified <paramref name="name" />, <paramref name="version" />, and <paramref name="tags" />.</returns> 22public static Meter Create(this IMeterFactory meterFactory, string name, string? version = null, IEnumerable<KeyValuePair<string, object?>>? tags = null)
System\Diagnostics\Metrics\MeterListener.cs (7)
65if (!Meter.IsSupported) 106if (!Meter.IsSupported) 133if (!Meter.IsSupported) 179if (!Meter.IsSupported) 195publishedInstruments = Meter.GetPublishedInstruments(); 213if (!Meter.IsSupported) 249if (!Meter.IsSupported)
System\Diagnostics\Metrics\MeterOptions.cs (1)
9/// Options for creating a <see cref="Meter"/>.
System\Diagnostics\Metrics\ObservableCounter.cs (6)
20internal ObservableCounter(Meter meter, string name, Func<T> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null) 24internal ObservableCounter(Meter meter, string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 30internal ObservableCounter(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null) 34internal ObservableCounter(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 40internal ObservableCounter(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description) : this(meter, name, observeValues, unit, description, tags: null) 44internal ObservableCounter(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\ObservableGauge.cs (6)
20internal ObservableGauge(Meter meter, string name, Func<T> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null) 24internal ObservableGauge(Meter meter, string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 30internal ObservableGauge(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null) 34internal ObservableGauge(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 40internal ObservableGauge(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description) : this(meter, name, observeValues, unit, description, tags: null) 44internal ObservableGauge(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\ObservableInstrument.cs (2)
25protected ObservableInstrument(Meter meter, string name, string? unit, string? description) : this(meter, name, unit, description, tags: null) 38protected ObservableInstrument(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\ObservableUpDownCounter.cs (6)
20internal ObservableUpDownCounter(Meter meter, string name, Func<T> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null) 24internal ObservableUpDownCounter(Meter meter, string name, Func<T> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 30internal ObservableUpDownCounter(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description) : this(meter, name, observeValue, unit, description, tags: null) 34internal ObservableUpDownCounter(Meter meter, string name, Func<Measurement<T>> observeValue, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags) 40internal ObservableUpDownCounter(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description) : this(meter, name, observeValues, unit, description, tags: null) 44internal ObservableUpDownCounter(Meter meter, string name, Func<IEnumerable<Measurement<T>>> observeValues, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System\Diagnostics\Metrics\RuntimeMetrics.cs (1)
16private static readonly Meter s_meter = new(MeterName);
System\Diagnostics\Metrics\UpDownCounter.cs (2)
17internal UpDownCounter(Meter meter, string name, string? unit, string? description) : this(meter, name, unit, description, tags: null) 21internal UpDownCounter(Meter meter, string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) : base(meter, name, unit, description, tags)
System.Net.Http (8)
System\Net\Http\HttpClientHandler.cs (2)
92/// Gets or sets the <see cref="IMeterFactory"/> to create a custom <see cref="Meter"/> for the <see cref="HttpClientHandler"/> instance. 96/// will be recorded using the <see cref="Meter"/> provided by the <see cref="IMeterFactory"/>.
System\Net\Http\Metrics\MetricsHandler.cs (2)
18public MetricsHandler(HttpMessageHandler innerHandler, IMeterFactory? meterFactory, out Meter meter) 152public static Meter Instance { get; } = new SharedMeter();
System\Net\Http\SocketsHttpHandler\Metrics\SocketsHttpHandlerMetrics.cs (1)
9internal sealed class SocketsHttpHandlerMetrics(Meter meter)
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (3)
475/// Gets or sets the <see cref="IMeterFactory"/> to create a custom <see cref="Meter"/> for the <see cref="SocketsHttpHandler"/> instance. 479/// will be recorded using the <see cref="Meter"/> provided by the <see cref="IMeterFactory"/>. 534handler = new MetricsHandler(handler, settings._meterFactory, out Meter meter);
System.Net.NameResolution (1)
System\Net\NameResolutionMetrics.cs (1)
13private static readonly Meter s_meter = new("System.Net.NameResolution");
System.Net.Quic (1)
System\Net\Quic\NetEventSource.Quic.Counters.cs (1)
17private static readonly Meter s_meter = new Meter("Private.InternalDiagnostics.System.Net.Quic.MsQuic");