-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add error metrics #120
add error metrics #120
Conversation
@@ -17,9 +17,20 @@ pub enum Error { | |||
EmptyPathForStarCountAggregate, | |||
NoFields, | |||
TypeMismatch(serde_json::Value, database::ScalarType), | |||
CapabilityNotSupported(UnsupportedCapabilities), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we don't actually use this; why is it necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Future proofing and documentation. If you don't like it I can remove it :)
@@ -15,7 +15,7 @@ name = "ndc-postgres" | |||
path = "bin/main.rs" | |||
|
|||
[dependencies] | |||
ndc-sdk = { git = "https://github.com/hasura/ndc-hub.git", rev = "5b8761b7" } | |||
ndc-sdk = { git = "https://github.com/hasura/ndc-hub.git", rev = "619655a" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume we're changing to use the new reverted-metrics commit of ndc-hub
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't bother updating the hash because that commit is just a revert so effectively it's the same code, so I reverted the update commit.
#[derive(Debug, Clone)] | ||
pub struct ErrorMetrics { | ||
/// the connector received an invalid request. | ||
invalid_request_total: IntCounter, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have another ticket for counting failed connection acquisition, so this grouping will be helpful for that.
What
We'd like to monitor the kinds of errors we run into to measure the connector's health, so we add counters for errors according to a few categorizations.
How
We add counters for the following metrics:
And use ndc-postgres errors to find and count said errors.