-
Notifications
You must be signed in to change notification settings - Fork 616
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
Issue #151: Add support for Circonus metrics #150
Issue #151: Add support for Circonus metrics #150
Conversation
# | ||
# The default is | ||
# | ||
# metrics.circonus.apiapp = "fabio" |
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.
Don't use double quotes unless you want to send them. Also, if this is the default then you need to set this in config/default.go
. Same for metrics.circonus.apiurl
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.
Added a default for CirconusAPIApp to defaults. I reworded the description of the API URL parameter, I'd prefer to keep that default localized in the library so that if it changes there isn't a waterfall of PRs to update.
Could you also update the comment for the 2nd commit to |
@@ -512,16 +512,18 @@ | |||
# | |||
# The default is | |||
# | |||
# metrics.circonus.apiapp = "fabio" | |||
# metrics.circonus.apiapp = |
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.
Hmm, if you set a default in config/default.go
then this needs to be reflected here. Why did you remove it?
should be metrics.circonus.apiapp = fabio
I thinks this looks ok enough. I'll merge this manually since the |
@maier you seem to have forgotten to add |
@maier or is this ok?
|
|
that's the one setting which is required, the rest are optional. |
Got it. I'm still curious what |
testAll actually does the job, it connects to the api and performs all of the steps. verification is two-fold, if the code fails and then checking manually in the UI for the metric coming through. the code will fail in finding/creating the check, then i go over to the ui and verify that a) the fake metric was created and b) a submission came through for it. it's gated by the env vars so that it doesn't thrash the checks. |
ok, that's what I thought. This is an integration test which requires manual inspection. I'll leave it in for now but need to think about whether I would want to mock the API or check this another way. I don't want to test the driver. As a side note: I would also like to merge the change from #125 which adds a counter to the metrics registry.
How would I add this to the circonus registry? |
type cgmCounter struct {
metrics *cgm.CirconusMetrics
name string
}
func (m *cgmRegistry) GetCounter(name string) Counter {
metricName := fmt.Sprintf("%s`%s", m.prefix, name)
return &cgmCounter{m.metrics, metricName}
}
func (c cgmCounter) Inc(n int64) {
c.metrics.IncrementByValue(c.name, uint64(n))
} |
OK, I just noticed that the registry methods return pointers ( |
This patch adds support for sending metrics to Circonus (http://circonus.com). The code is squashed from PR #150 with minor edits and was written by @maier.
Did a manual merge of this PR to master. |
Adding support for sending metrics to Circonus.