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

Monitor's _internal cq measurement is calculated incorrectly #8091

Closed
rossmcdonald opened this issue Mar 2, 2017 · 0 comments
Closed

Monitor's _internal cq measurement is calculated incorrectly #8091

rossmcdonald opened this issue Mar 2, 2017 · 0 comments

Comments

@rossmcdonald
Copy link
Contributor

Bug report

Steps to reproduce:

The call here:

if err := s.ExecuteContinuousQuery(&db, &cq, req.Now); err != nil {
	s.Logger.Info(fmt.Sprintf("error executing query: %s: err = %s", cq.Query, err))
	atomic.AddInt64(&s.stats.QueryFail, 1)
} else {
	atomic.AddInt64(&s.stats.QueryOK, 1)
}

Doesn't collect metrics accurately, since ExecuteContinousQuery doesn't always run the query if it doesn't need to be run. The call here will return nil if the query doesn't need to be run, but the s.stats.QueryOK metric is always incremented regardless. So what _internal."monitor".cq.queryOK really measures is how many CQ's are existing, which isn't useful or accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants