37 references to Enabled
Microsoft.AspNetCore.Diagnostics (1)
DiagnosticsMetrics.cs (1)
32if (_handlerExceptionCounter.Enabled)
Microsoft.AspNetCore.Hosting (4)
Internal\HostingMetrics.cs (4)
51if (_activeRequestsCounter.Enabled) 56if (!disableHttpRequestDurationMetric && _requestDuration.Enabled) 102public bool IsEnabled() => _activeRequestsCounter.Enabled || _requestDuration.Enabled;
Microsoft.AspNetCore.Http.Connections (2)
Internal\HttpConnectionsMetrics.cs (2)
109return new MetricsContext(_connectionDuration.Enabled, _currentConnectionsCounter.Enabled);
Microsoft.AspNetCore.RateLimiting (9)
RateLimitingMetrics.cs (9)
56if (_requestsCounter.Enabled) 89if (metricsContext.CurrentLeasedRequestsCounterEnabled || _requestLeaseDurationCounter.Enabled || _requestsCounter.Enabled) 106if (_requestLeaseDurationCounter.Enabled) 112if (_requestsCounter.Enabled) 138if (metricsContext.CurrentQueuedRequestsCounterEnabled || _queuedRequestDurationCounter.Enabled) 155if (_queuedRequestDurationCounter.Enabled) 189return new MetricsContext(policyName, _activeRequestLeasesCounter.Enabled, _queuedRequestsCounter.Enabled);
Microsoft.AspNetCore.Routing (1)
RoutingMetrics.cs (1)
29public bool MatchSuccessCounterEnabled => _matchAttemptsCounter.Enabled;
Microsoft.AspNetCore.Server.Kestrel.Core (8)
Internal\Infrastructure\KestrelMetrics.cs (8)
152if (_rejectedConnectionsCounter.Enabled) 285if (metricsContext.CurrentTlsHandshakesCounterEnabled || _tlsHandshakeDuration.Enabled) 369CurrentConnectionsCounterEnabled = _activeConnectionsCounter.Enabled, 370ConnectionDurationEnabled = _connectionDuration.Enabled, 371QueuedConnectionsCounterEnabled = _queuedConnectionsCounter.Enabled, 372QueuedRequestsCounterEnabled = _queuedRequestsCounter.Enabled, 373CurrentUpgradedRequestsCounterEnabled = _currentUpgradedRequestsCounter.Enabled, 374CurrentTlsHandshakesCounterEnabled = _activeTlsHandshakesCounter.Enabled
Microsoft.Extensions.AI (7)
ChatCompletion\OpenTelemetryChatClient.cs (4)
116Stopwatch? stopwatch = _operationDurationHistogram.Enabled ? Stopwatch.StartNew() : null; 147Stopwatch? stopwatch = _operationDurationHistogram.Enabled ? Stopwatch.StartNew() : null; 345if (_operationDurationHistogram.Enabled && stopwatch is not null) 358if (_tokenUsageHistogram.Enabled && completion?.Usage is { } usage)
Embeddings\OpenTelemetryEmbeddingGenerator.cs (3)
81Stopwatch? stopwatch = _operationDurationHistogram.Enabled ? Stopwatch.StartNew() : null; 167if (_operationDurationHistogram.Enabled && stopwatch is not null) 179if (_tokenUsageHistogram.Enabled && inputTokens.HasValue)
System.Net.Http (4)
System\Net\Http\Metrics\MetricsHandler.cs (4)
38if (_activeRequests.Enabled || _requestsDuration.Enabled) 85bool recordCurrentRequests = _activeRequests.Enabled; 106if (!_requestsDuration.Enabled)
System.Net.NameResolution (1)
System\Net\NameResolutionMetrics.cs (1)
27public static bool IsEnabled() => s_lookupDuration.Enabled;