1 instantiation of MetricsContext
Microsoft.AspNetCore.RateLimiting (1)
RateLimitingMetrics.cs (1)
189return new MetricsContext(policyName, _activeRequestLeasesCounter.Enabled, _queuedRequestsCounter.Enabled);
14 references to MetricsContext
Microsoft.AspNetCore.RateLimiting (14)
RateLimitingMetrics.cs (12)
54public void LeaseFailed(in MetricsContext metricsContext, RequestRejectionReason reason) 63private void LeaseFailedCore(in MetricsContext metricsContext, RequestRejectionReason reason) 71public void LeaseStart(in MetricsContext metricsContext) 80public void LeaseStartCore(in MetricsContext metricsContext) 87public void LeaseEnd(in MetricsContext metricsContext, long startTimestamp, long currentTimestamp) 96private void LeaseEndCore(in MetricsContext metricsContext, long startTimestamp, long currentTimestamp) 120public void QueueStart(in MetricsContext metricsContext) 129private void QueueStartCore(in MetricsContext metricsContext) 136public void QueueEnd(in MetricsContext metricsContext, RequestRejectionReason? reason, long startTimestamp, long currentTimestamp) 145private void QueueEndCore(in MetricsContext metricsContext, RequestRejectionReason? reason, long startTimestamp, long currentTimestamp) 168private static void InitializeRateLimitingTags(ref TagList tags, in MetricsContext metricsContext) 187public MetricsContext CreateContext(string? policyName)
RateLimitingMiddleware.cs (2)
91var metricsContext = _metrics.CreateContext(policyName); 151private async ValueTask<LeaseContext> TryAcquireAsync(HttpContext context, MetricsContext metricsContext)