1 instantiation of KestrelMetrics
Microsoft.AspNetCore.Server.Kestrel.Core (1)
KestrelServer.cs (1)
40new KestrelMetrics(new DummyMeterFactory()),
46 references to KestrelMetrics
Microsoft.AspNetCore.Server.Kestrel (1)
WebHostBuilderKestrelExtensions.cs (1)
87services.AddSingleton<KestrelMetrics>();
Microsoft.AspNetCore.Server.Kestrel.Core (45)
Internal\ConnectionDispatcher.cs (1)
25private KestrelMetrics Metrics => _serviceContext.Metrics;
Internal\Http\Http1ChunkedEncodingMessageBody.cs (1)
143KestrelMetrics.AddConnectionEndReason(_context.MetricsContext, ConnectionEndReason.UnexpectedEndOfRequestContent);
Internal\Http\Http1Connection.cs (9)
166KestrelMetrics.AddConnectionEndReason(MetricsContext, reason); 178KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.RequestHeadersTimeout); 186KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.MinRequestBodyDataRate); 755KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.InvalidRequestHeaders); 766KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.InvalidRequestHeaders); 799KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.InvalidRequestHeaders); 808KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.InvalidRequestHeaders); 890KestrelMetrics.AddConnectionEndReason(MetricsContext, ConnectionEndReason.OtherError); 1041KestrelMetrics.AddConnectionEndReason(MetricsContext, reason);
Internal\Http\Http1MessageBody.cs (2)
226KestrelMetrics.AddConnectionEndReason(context.MetricsContext, ConnectionEndReason.InvalidRequestHeaders); 247KestrelMetrics.AddConnectionEndReason(_context.MetricsContext, ConnectionEndReason.UnexpectedEndOfRequestContent);
Internal\Http\Http1OutputProducer.cs (1)
473KestrelMetrics.AddConnectionEndReason(_connectionMetricsContext, reason);
Internal\Http2\Http2Connection.cs (2)
243KestrelMetrics.AddConnectionEndReason(_metricsContext, reason); 1378_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); 633_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)
43KestrelMetrics metrics, 77private static ServiceContext CreateServiceContext(IOptions<KestrelServerOptions> options, ILoggerFactory loggerFactory, DiagnosticSource? diagnosticSource, KestrelMetrics metrics, 432private static ConnectionDelegate EnforceConnectionLimit(ConnectionDelegate innerDelegate, long? connectionLimit, KestrelTrace trace, KestrelMetrics metrics) 442private static MultiplexedConnectionDelegate EnforceConnectionLimit(MultiplexedConnectionDelegate innerDelegate, long? connectionLimit, KestrelTrace trace, KestrelMetrics metrics)
Internal\ServiceContext.cs (1)
36public KestrelMetrics Metrics { get; set; } = default!;
ListenOptionsHttpsExtensions.cs (4)
199var metrics = listenOptions.KestrelServerOptions.ApplicationServices.GetRequiredService<KestrelMetrics>(); 262var 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)
39private readonly KestrelMetrics _metrics; 57public HttpsConnectionMiddleware(ConnectionDelegate next, HttpsConnectionAdapterOptions options, HttpProtocols httpProtocols, KestrelMetrics metrics) 62public HttpsConnectionMiddleware(ConnectionDelegate next, HttpsConnectionAdapterOptions options, HttpProtocols httpProtocols, ILoggerFactory loggerFactory, KestrelMetrics metrics) 132KestrelMetrics metrics) 228if (KestrelMetrics.TryGetHandshakeProtocol(sslStream.SslProtocol, out var protocolName, out var protocolVersion)) 269static void RecordHandshakeFailed(KestrelMetrics metrics, long startTimestamp, long currentTimestamp, ConnectionMetricsContext metricsContext, IConnectionMetricsTagsFeature? metricsTagsFeature, Exception ex) 274KestrelMetrics.AddConnectionEndReason(metricsTagsFeature, ConnectionEndReason.TlsHandshakeFailed);