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

RetainKeys, Recycling Connections, Buffered Sends, More BufferedTimer stats #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wyndhblb
Copy link

  1. more stats to timers
  2. RetainKeys options for Buffer client to keep send stats even if they
    are 0
  3. send stats in many lines (not one connection per line)
  4. Add "Reset" to events (to deal with retain keys)
  5. Add a NoOp client for easy switching when there is no statsd in your
    land
  6. ReCycleConnection for buffered client to close connections after
    sending (in order to pick up and new IPs)

Bo Blanton added 2 commits February 13, 2015 08:29
1) more stats to timers
2) RetainKeys options for Buffer client to keep send stats even if they
are 0
3) send stats in may lines (not one connection per line)
4) Add "Reset" to events (to deal with retain keys)
5) Add a NoOp client for easy switching when there is no statsd in your
land
6) ReCycleConnection for buffered client to close connections after
sending (in order to pick up and new IPs)
@quipo
Copy link
Owner

quipo commented Jan 18, 2016

hi Wyndham, I've cherry-picked a few changes (e.g. the NoOp client), can you update the PR with the current version? Also, can you add a few more comments about the proposed functionality? Thanks.

@wyndhblb
Copy link
Author

Hi .. been a while. Sorry about that.

The "RetainKeys" option lets the emitter send "0"s for keys that have not gotten any metrics in the flush window (for a buffered client anyways). This is not something that one typically wants by default. But sometimes "0" is better then "null" in which ever metric|alerting system one is using. It means things things are still running, but nothing is happening rather then the service is dead. Thus the "Reset" is added to 0 out keys rather then simply remove them. This is sort of like the deleteIdleStats setting in statsd itself. That particular setting is not a good thing for consistent hashed setups, but if the origin can keep sending the keys it is ok.

The RecycleConnections is for systems that constantly have moving targets based on DNS names. Otherwise things will hold on to the old original IP addr until the app is restarted. Which helps when migrating the backend systems to new systems non-destructively.

- EchoClient: prints the lines as the would go out
- FloatGauge
- String() methods for nice printing
- mend some go race conditions
- add median/std to buffered timers
- add sample rates for clients (static: one for counters, one for timers)
- add stats to the expvars so we can seem them on the profile pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants