-
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
feat: monitor sql database #444
Conversation
37976cf
to
fb61150
Compare
fb61150
to
21f9e0d
Compare
sqlutil/monitor.go
Outdated
maxOpenConnectionsStat := statsFactory.NewStat(dbIdentifier+".db.max_open_connections", stats.CountType) | ||
openConnectionsStat := statsFactory.NewStat(dbIdentifier+".db.open_connections", stats.CountType) | ||
inUseStat := statsFactory.NewStat(dbIdentifier+".db.in_use", stats.CountType) | ||
idleStat := statsFactory.NewStat(dbIdentifier+".db.idle", stats.CountType) | ||
waitCountStat := statsFactory.NewStat(dbIdentifier+".db.wait_count", stats.CountType) |
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.
wouldn't a gauge make more sense here..?
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.
Probably everything can be Gauge instead of WaitDuration
?
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.
yeah
Suggestion: aggregate things like |
Good point. I was thinking of adding tags instead of creating different stat per identifier. It would be easy to aggregate. |
138c42b
to
99826a5
Compare
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
Description
Linear Ticket
Security