-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
statsd support #76
statsd support #76
Conversation
work in progress |
ok, ready for review @jehiah |
return errors.New("not connected") | ||
} | ||
stat = fmt.Sprintf(c.prefix, stat) | ||
format = fmt.Sprintf("%s:%s", stat, format) |
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.
why not just add a %s
to the beinning of this and remove the need to enforce that the client specifies that on the command line? (they prefix because exactly that, just a prefix).
format = fmt.Sprintf("%s%s:%s", c.prefix, stat, format)
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.
hah, good idea :)
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.
updated
…esponse format for /empty_channel
squashed |
* cleanup stats collection code to separate retrieval from formatting * add options for statsd * add statsd client * add statsdLoop that pushes diffs over UDP to a configured statsd address
* add --graphite-url command line parameter * add --use-statsd-prefix command line parameter * readme/statsd docs
config: normalize opt names to underscores
fix npe when trace log does not belong to nsqd
we'd like to support pretty charts and stats via
nsqadmin
with as little built in work as possible.the simplest initial approach seems to be that
nsqd
can write UDP packets directly to astatsd
node (which eventually gets into graphite, which can then be queried by nsqadmin).in terms of the impact to the
nsqd
codebase, a lot of the foundational work would be necessary regardless of whether the output wasstatsd
format or whether it was a new command on the V2 protocol that pushed some internal format over the wire to a client.It seems that
statsd
is a common and supported enough platform to build on top of.cc @jehiah