Skip to content

Commit bfc5b84

Browse files
committed
Implemented metrics
1 parent 90aaa95 commit bfc5b84

File tree

5 files changed

+311
-71
lines changed

5 files changed

+311
-71
lines changed

crates/configuration/src/values/redacted.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use serde::Deserialize;
44
/// If printed out for any reason, will redact the inner value
55
/// While we should not intentionally print out this information anyways, this is more of a safety measure that cannot hurt
66
/// This also helps us mark the sensitive nature of the value.
7-
#[derive(Clone, PartialEq, Eq, Deserialize)]
7+
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Deserialize)]
88
pub struct Redacted<T>(T);
99

1010
impl<T> Redacted<T> {

crates/connectors/ndc-postgres/src/error/convert.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,8 @@ pub fn pool_aquisition_error_to_response(error: PoolAquisitionError) -> ErrorRes
5555
PoolAquisitionError::LockError(_) => {
5656
ErrorResponse::new_internal_with_details(serde_json::Value::String(error.to_string()))
5757
}
58+
PoolAquisitionError::PoolCreationError(_) => {
59+
ErrorResponse::new_internal_with_details(serde_json::Value::String(error.to_string()))
60+
}
5861
}
5962
}

crates/connectors/ndc-postgres/src/error/record.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,8 @@ pub fn pool_aquisition_error(error: &PoolAquisitionError, metrics: &metrics::Met
5757
PoolAquisitionError::LockError(_) => {
5858
metrics.error_metrics.record_connector_error();
5959
}
60+
PoolAquisitionError::PoolCreationError(_) => {
61+
metrics.error_metrics.record_database_error();
62+
}
6063
}
6164
}

0 commit comments

Comments
 (0)