Skip to content

Instantly share code, notes, and snippets.

@heavypackets
Created October 5, 2018 15:11
Show Gist options
  • Save heavypackets/1f5f1161158cea7230c4c5a9d18ee422 to your computer and use it in GitHub Desktop.
Save heavypackets/1f5f1161158cea7230c4c5a9d18ee422 to your computer and use it in GitHub Desktop.
static ref unsuccessful_login_counter: Counter = {
match register_counter!(opts!(
"simple_secrets_login_failure_total",
"Total number of failed logins in this instance lifetime.")) {
Ok(val) => val,
Err(e) => telemetry_config_failed_panic(&e)
}
};
static ref secrets_fetch_counter: Counter = {
match register_counter!(opts!(
"simple_secrets_secret_fetch_total",
"Total number of secrets accessed in this instance lifetime.")) {
Ok(val) => val,
Err(e) => telemetry_config_failed_panic(&e)
}
};
static ref secrets_fetch_access_denied_counter: Counter = {
match register_counter!(opts!(
"simple_secrets_secret_fetch_access_denied_total",
"Total number of unsuccessful secret access attempts in this instance lifetime due to invalid token.")) {
Ok(val) => val,
Err(e) => telemetry_config_failed_panic(&e)
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment