1 instantiation of KestrelMetrics
Microsoft.AspNetCore.Server.Kestrel.Core (1)
KestrelServer.cs (1)
39new KestrelMetrics(new DummyMeterFactory()));
45 references to KestrelMetrics
Microsoft.AspNetCore.Server.Kestrel.Core (45)
Internal\ConnectionDispatcher.cs (1)
25private KestrelMetrics Metrics => _serviceContext.Metrics;
Internal\Http\Http1ChunkedEncodingMessageBody.cs (1)
140KestrelMetrics.AddConnectionEndReason(_context.MetricsContext, ConnectionEndReason.UnexpectedEndOfRequestContent);
Internal\Http\Http1Connection.cs (9)
142KestrelMetrics.AddConnectionEndReason(MetricsContext, reason); 154KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.RequestHeadersTimeout); 162KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.MinRequestBodyDataRate); 624KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.InvalidRequestHeaders); 635KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.InvalidRequestHeaders); 668KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.InvalidRequestHeaders); 677KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.InvalidRequestHeaders); 743KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.OtherError); 842KestrelMetrics.AddConnectionEndReason(MetricsContext, reason);
Internal\Http\Http1MessageBody.cs (2)
210KestrelMetrics.AddConnectionEndReason(context.MetricsContext, ConnectionEndReason.InvalidRequestHeaders); 231KestrelMetrics.AddConnectionEndReason(_context.MetricsContext, ConnectionEndReason.UnexpectedEndOfRequestContent);
Internal\Http\Http1OutputProducer.cs (1)
472KestrelMetrics.AddConnectionEndReason(_connectionMetricsContext, reason);
Internal\Http2\Http2Connection.cs (2)
239KestrelMetrics.AddConnectionEndReason(_metricsContext, reason); 1344_context.ServiceContext.Metrics.RequestQueuedStart(_metricsContext, KestrelMetrics.Http2);
Internal\Http2\Http2StreamOfT.cs (1)
24ServiceContext.Metrics.RequestQueuedStop(MetricsContext, KestrelMetrics.Http2);
Internal\Http3\Http3Connection.cs (2)
190KestrelMetrics.AddConnectionEndReason(MetricsContext, reason); 618_context.ServiceContext.Metrics.RequestQueuedStart(MetricsContext, KestrelMetrics.Http3);
Internal\Http3\Http3StreamOfT.cs (1)
23ServiceContext.Metrics.RequestQueuedStop(MetricsContext, KestrelMetrics.Http3);
Internal\HttpConnection.cs (4)
72AddMetricsHttpProtocolTag(KestrelMetrics.Http11); 80AddMetricsHttpProtocolTag(KestrelMetrics.Http2); 85AddMetricsHttpProtocolTag(KestrelMetrics.Http3); 131KestrelMetrics.AddConnectionEndReason(connectionMetricsTagsFeature, connectionEndReason);
Internal\Infrastructure\KestrelConnectionOfT.cs (1)
33private KestrelMetrics Metrics => _serviceContext.Metrics;
Internal\Infrastructure\TransportConnectionManager.cs (1)
81KestrelMetrics.AddConnectionEndReason(
Internal\KestrelServerImpl.cs (4)
42KestrelMetrics metrics) 75private static ServiceContext CreateServiceContext(IOptions<KestrelServerOptions> options, ILoggerFactory loggerFactory, DiagnosticSource? diagnosticSource, KestrelMetrics metrics) 428private static ConnectionDelegate EnforceConnectionLimit(ConnectionDelegate innerDelegate, long? connectionLimit, KestrelTrace trace, KestrelMetrics metrics) 438private static MultiplexedConnectionDelegate EnforceConnectionLimit(MultiplexedConnectionDelegate innerDelegate, long? connectionLimit, KestrelTrace trace, KestrelMetrics metrics)
Internal\ServiceContext.cs (1)
36public KestrelMetrics Metrics { get; set; } = default!;
ListenOptionsHttpsExtensions.cs (4)
195var metrics = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<KestrelMetrics>(); 258var metrics = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<KestrelMetrics>();
Middleware\ConnectionLimitMiddleware.cs (3)
16private readonly KestrelMetrics _metrics; 18public ConnectionLimitMiddleware(Func<T, Task> next, long connectionLimit, KestrelTrace trace, KestrelMetrics metrics) 24internal ConnectionLimitMiddleware(Func<T, Task> next, ResourceCounter concurrentConnectionCounter, KestrelTrace trace, KestrelMetrics metrics)
Middleware\HttpsConnectionMiddleware.cs (7)
38private readonly KestrelMetrics _metrics; 53public HttpsConnectionMiddleware(ConnectionDelegate next, HttpsConnectionAdapterOptions options, HttpProtocols httpProtocols, KestrelMetrics metrics) 58public HttpsConnectionMiddleware(ConnectionDelegate next, HttpsConnectionAdapterOptions options, HttpProtocols httpProtocols, ILoggerFactory loggerFactory, KestrelMetrics metrics) 121KestrelMetrics metrics) 207if (KestrelMetrics.TryGetHandshakeProtocol(sslStream.SslProtocol, out var protocolName, out var protocolVersion)) 239static void RecordHandshakeFailed(KestrelMetrics metrics, long startTimestamp, long currentTimestamp, ConnectionMetricsContext metricsContext, IConnectionMetricsTagsFeature? metricsTagsFeature, Exception ex) 244KestrelMetrics.AddConnectionEndReason(metricsTagsFeature, ConnectionEndReason.TlsHandshakeFailed);