// EXT_ORIGIN_REQUEST_FAILED is used when connection to server was successful, but transaction on
// std::function. The setting happens in constructor based on split_external_local_origin_errors
DetectorImpl::create(Cluster& cluster, const envoy::config::cluster::v3::OutlierDetection& config,
if (config_.successfulActiveHealthCheckUnejectHost() && cluster.healthChecker() != nullptr) {
void DetectorImpl::updateEnforcedEjectionStats(envoy::data::cluster::v3::OutlierEjectionType type) {
void DetectorImpl::updateDetectedEjectionStats(envoy::data::cluster::v3::OutlierEjectionType type) {
100, runtime_.snapshot().getInteger(MaxEjectionPercentRuntime, config_.maxEjectionPercent()));
double ejected_percent = 100.0 * (ejections_active_helper_.value() + 1) / host_monitors_.size();
notifyMainThreadConsecutiveError(host, envoy::data::cluster::v3::CONSECUTIVE_GATEWAY_FAILURE);
// Ejections come in cross thread. There is a chance that the host has already been removed from
// We also reset the appropriate counter here to allow the monitor to detect a bout of consecutive
host.second->successRate(DetectorHostMonitor::SuccessRateMonitorType::ExternalOrigin, -1);
processSuccessRateEjections(DetectorHostMonitor::SuccessRateMonitorType::ExternalOrigin);
void EventLoggerImpl::setCommonEventParams(envoy::data::cluster::v3::OutlierDetectionEvent& event,
TimestampUtil::systemClockToTimestamp(time_source_.systemTime(), *event.mutable_timestamp());
absl::optional<std::pair<double, uint64_t>> SuccessRateAccumulator::getSuccessRateAndVolume() {