Skip to content

Commit db62fb4

Browse files
authored
Added FailedQueryCounter inc()
Hello @dewey, Thanks for your review comments. As per your previous comments, I have added Inc() and yes this gives more info on number of Query failures. This info really helps in debugging and understanding the failures. Please review and let me know if any other suggestion. Thanks, Santoshkumar Patil
1 parent c38f73e commit db62fb4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

query.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func (q *Query) Run(conn *connection) error {
6767
failedScrapes.WithLabelValues(conn.driver, conn.host, conn.database, conn.user, q.jobName, q.Name).Set(0.0)
6868
} else {
6969
failedScrapes.WithLabelValues(conn.driver, conn.host, conn.database, conn.user, q.jobName, q.Name).Set(1.0)
70+
failedQueryCounter.WithLabelValues(q.jobName, q.Name).Inc()
7071
return fmt.Errorf("zero rows returned")
7172
}
7273
}

0 commit comments

Comments
 (0)