-
Notifications
You must be signed in to change notification settings - Fork 58
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
chore: dbconn truncate possible too long error messages #3283
Conversation
You can find the image built from this PR at
Built from c5a3acf |
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.
Thank you!
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.
LGTM!
@@ -300,18 +302,19 @@ proc dbConnQueryPrepared*( | |||
error "error in dbConnQueryPrepared", error = $error | |||
return err("error in dbConnQueryPrepared calling sendQuery: " & $error) | |||
|
|||
let stmtNameSummary = stmtName[0 ..< min(stmtName.len, 128)] |
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.
This is incorrect. The issue isn't length but cardinality of labels. We need another fix for these metrics.
No metrics should set values for labels that are unbound.
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.
Please read: https://prometheus.io/docs/practices/naming/#labels
Thanks for clarifying @jakubgs ! |
Description
libpq sometimes gives extremly long error messages. This PRs limits that
Issue
closes #3282