1 instantiation of Counter
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\Meter.cs (1)
148=> (Counter<T>)GetOrCreateInstrument<T>(typeof(Counter<T>), name, unit, description, tags, () => new Counter<T>(this, name, unit, description, tags));
41 references to Counter
Aspire.Confluent.Kafka (8)
ConfluentKafkaMetrics.cs (8)
13public Counter<long> Tx { get; } 14public Counter<long> TxBytes { get; } 15public Counter<long> TxMessages { get; } 16public Counter<long> TxMessageBytes { get; } 17public Counter<long> Rx { get; } 18public Counter<long> RxBytes { get; } 19public Counter<long> RxMessages { get; } 20public Counter<long> RxMessageBytes { get; }
Microsoft.AspNetCore.Diagnostics (1)
DiagnosticsMetrics.cs (1)
18private readonly Counter<long> _handlerExceptionCounter;
Microsoft.AspNetCore.RateLimiting (1)
RateLimitingMetrics.cs (1)
20private readonly Counter<long> _requestsCounter;
Microsoft.AspNetCore.Routing (1)
RoutingMetrics.cs (1)
17private readonly Counter<long> _matchAttemptsCounter;
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\KestrelMetrics.cs (1)
31private readonly Counter<long> _rejectedConnectionsCounter;
Microsoft.Extensions.Diagnostics.Testing (1)
Metrics\MeasurementExtensions.cs (1)
60/// Process the series of measurements adding all values together to produce a final count, identical to what a <see cref="Counter{T}" /> instrument would produce.
Microsoft.Extensions.Diagnostics.Testing.Tests (21)
Metrics\MeasurementExtensionsTests.cs (11)
18var counter = meter.CreateCounter<long>("MyCounter"); 43var counter = meter.CreateCounter<long>("MyCounter"); 68var counter = meter.CreateCounter<long>("MyCounter"); 96var counter = meter.CreateCounter<long>("MyCounter"); 127var counter = meter.CreateCounter<byte>("MyCounter"); 144var counter = meter.CreateCounter<short>("MyCounter"); 161var counter = meter.CreateCounter<int>("MyCounter"); 178var counter = meter.CreateCounter<long>("MyCounter"); 195var counter = meter.CreateCounter<float>("MyCounter"); 212var counter = meter.CreateCounter<double>("MyCounter"); 229var counter = meter.CreateCounter<decimal>("MyCounter");
Metrics\MetricCollectorTests.cs (10)
34var counter = meter.CreateCounter<long>("Counter"); 55var counter = meter.CreateCounter<long>(CounterName); 95var counter = meter.CreateCounter<long>(CounterName); 141var counter = meter.CreateCounter<long>(CounterName); 243var counter = meter.CreateCounter<long>(CounterName); 281var counter = meter.CreateCounter<long>(CounterName); 307var counter = meter.CreateCounter<long>(CounterName); 339var counter = meter.CreateCounter<long>(CounterName); 354var counter = meter.CreateCounter<long>(CounterName); 392var counter = meter.CreateCounter<long>(CounterName);
Stress.ApiService (1)
TestMetrics.cs (1)
14private readonly Counter<int> _counter;
System.Diagnostics.DiagnosticSource (6)
System\Diagnostics\Metrics\AggregationManager.cs (1)
311if (genericDefType == typeof(Counter<>))
System\Diagnostics\Metrics\Meter.cs (4)
134public Counter<T> CreateCounter<T>(string name, string? unit = null, string? description = null) where T : struct => CreateCounter<T>(name, unit, description, tags: null); 147public Counter<T> CreateCounter<T>(string name, string? unit, string? description, IEnumerable<KeyValuePair<string, object?>>? tags) where T : struct 148=> (Counter<T>)GetOrCreateInstrument<T>(typeof(Counter<T>), name, unit, description, tags, () => new Counter<T>(this, name, unit, description, tags));
System\Diagnostics\Metrics\RuntimeMetrics.cs (1)
23private static readonly Counter<long> s_exceptions;