use crate::ops::runtime::metrics::auth::{
AuthMetricOperation, AuthMetricOutcome, AuthMetricReason, AuthMetricSurface, AuthMetrics,
};
pub fn record_attestation_verify_failed() {
record_attestation_metric(
AuthMetricOperation::Verify,
AuthMetricOutcome::Failed,
AuthMetricReason::VerifyFailed,
);
}
pub fn record_attestation_epoch_rejected() {
record_attestation_metric(
AuthMetricOperation::Verify,
AuthMetricOutcome::Failed,
AuthMetricReason::EpochRejected,
);
}
fn record_attestation_metric(
operation: AuthMetricOperation,
outcome: AuthMetricOutcome,
reason: AuthMetricReason,
) {
AuthMetrics::record(AuthMetricSurface::Attestation, operation, outcome, reason);
}