Skip to content
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

contrib/database/sql: Disable DBStats if statsd client initialization fails #2682

Merged
merged 12 commits into from
May 8, 2024
Merged
Prev Previous commit
Next Next commit
Move caller instructions to pollDBStats fn definition
mtoffl01 committed May 2, 2024
commit daabfba7457d7a968529f660dc0ccd188a33a328
4 changes: 0 additions & 4 deletions contrib/database/sql/metrics.go
Original file line number Diff line number Diff line change
@@ -38,10 +38,6 @@ func pollDBStats(statsd internal.StatsdClient, db *sql.DB) {
log.Debug("No traced DB connection found; cannot pull DB stats.")
return
}
if statsd == nil {
log.Debug("No statsd client found; cannot submit DB stats.")
return
}
log.Debug("DB stats will be gathered and sent every %v.", interval)
for range time.NewTicker(interval).C {
log.Debug("Reporting DB.Stats metrics...")