-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Add stats support for basic operations #2147
feat: Add stats support for basic operations #2147
Conversation
* [ORCA-393] Add basic stats. * Fmt.
* Add stats to global config. * Remove requied from stats field.
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 though I wont pretend I am good with golang.
return j.ProjectJobsTemplate.Execute(w, viewData) | ||
} | ||
|
||
func (j *JobsController) GetProjectJobs(w http.ResponseWriter, r *http.Request) { |
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.
Should this also be lowercase?
func (j *JobsController) GetProjectJobs(w http.ResponseWriter, r *http.Request) { | |
func (j *JobsController) getProjectJobs(w http.ResponseWriter, r *http.Request) { |
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.
no, these should be exported ideally to represent that only this function should be called since it has stats associated with it.
return nil | ||
} | ||
|
||
func (j *JobsController) GetProjectJobsWS(w http.ResponseWriter, r *http.Request) { |
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.
Should this be lowercase?
func (j *JobsController) GetProjectJobsWS(w http.ResponseWriter, r *http.Request) { | |
func (j *JobsController) getProjectJobsWS(w http.ResponseWriter, r *http.Request) { |
@nishkrishnan if I add:
to my atlantis yaml it breaks it:
|
@marceloboeira you're missing a closing single-quote on your |
This implementation uses tally, an OSS library for emitting stats. This implementation supports only statsd currently, however since this lib supports other stats providers (like prometheus) it's relatively straightforward to add support in atlantis for it.
To configure statsd, you can do so via the server config yaml:
ie.
Note: this is copied from the lyft fork, hence the large PR. This works internally in production.
TODO: