public async Task GetScaleResultAsync()

in Microsoft.Azure.WebJobs.Extensions.AzureCosmosDb.Mongo/Trigger/CosmosDBMongoTargetScaler.cs [44:56]


        public async Task<TargetScalerResult> GetScaleResultAsync(TargetScalerContext context)
        {
            try
            {
                CosmosDBMongoTriggerMetrics metrics = await _cosmosDBMongoMetricsProvider.GetMetricsAsync();
                return GetScaleResultInternal(context, metrics.PendingEventsCount);
            }
            catch (UnauthorizedAccessException ex)
            {
                this._logger.LogError(Events.OnScalingError, $"Target scaler is not supported. Exception: {ex}");
                throw new NotSupportedException("Target scaler is not supported.", ex);
            }
        }