-
Notifications
You must be signed in to change notification settings - Fork 158
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
Metrics #953
Conversation
Would be cool if we had an |
Good call, I can add that to the embedded error reporter 👍 |
return stats.Null, nil | ||
} | ||
|
||
func newDataDogStats(addr string) (stats.Stats, error) { |
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.
It might be worth at least having a datadog & plain statsd implementation at first. I think the only difference would be removing tags?
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.
Cool, yeah, I can add a plain statsd backend as well.
tags = append(tags, fmt.Sprintf("error:%s", err.Code())) | ||
stats.Inc(fmt.Sprintf("aws.request.error"), 1, 1.0, tags) | ||
stats.Inc(fmt.Sprintf("aws.request.%s.error", r.ClientInfo.ServiceName), 1, 1.0, tags) | ||
stats.Inc(fmt.Sprintf("aws.request.%s.%s.error", r.ClientInfo.ServiceName, r.Operation.Name), 1, 1.0, tags) |
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.
nm on the error stat :) sorry for jumping the gun
So awesome 👍 |
Added a commit that adds a statsd backend as well, and also changed the flag to empire server --stats=statsd://localhost:8125 Or empire server --stats=dogstatsd://localhost:8126 Or EMPIRE_STATS=statsd://localhost:8125 empire server |
Also added some sample of the go runtime metrics every 30 seconds as well. |
This sets up a small stats framework, and adds some middleware to all AWS clients that will increment some counters for aws requests and responses. This will allow us to get better visibility into throttling, or other issues.
We can also start using the
stats.*
methods to generate metrics for the other things, like number of deploys, how long deploys take, etc.The stats package is just a small layer of abstraction over a statsd'ish client, and I've only provided a datadog implementation for now.
Metrics we should have
aws.request.*
For outbound AWS requestsheroku.request.*
For inbound Heroku API requests.runtime.*
Golang runtime stats.heroku.auth.error
for authorization errors.core.*
for core API calls.scheduler.cloudformation.template_size
For tracking generated template sizes