function isMetricStale(metric, resourceType, resourceName, action, inflight, log) {
    if (metric.date && Date.now() - new Date(metric.date).getTime() >
        QuotaService.maxStaleness) {
        log.warn('Stale metrics from the quota service, allowing the request', {
            resourceType,
            resourceName,
            action,
            inflight,
        });
        monitoring.requestWithQuotaMetricsUnavailable.inc();
        return true;
    }
    return false;
}
Checks if a metric is stale based on the provided parameters.

@param {Object} metric - The metric object to check.
@param {string} resourceType - The type of the resource.
@param {string} resourceName - The name of the resource.
@param {string} action - The action being performed.
@param {number} inflight - The number of inflight requests.
@param {Object} log - The logger object.
@returns {boolean} Returns true if the metric is stale, false otherwise.