update with metrics types that were added to etsy/statsd #4

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
@mrtazz

mrtazz commented Apr 8, 2013

I added some information about metric types that were added in the newest release of etsy/statsd. Let me know if anything should be rephrased or adapted.

@b

This comment has been minimized.

Show comment Hide comment
@b

b Aug 2, 2013

Owner

Ping.

Owner

b commented Aug 2, 2013

Ping.

@mrtazz

This comment has been minimized.

Show comment Hide comment
@mrtazz

mrtazz Aug 11, 2013

ugh sorry for the delay. You're absolutely right about the gauges delta. However we had some requests for it and a lively discussion on the pull request after which we decided to add this functionality. And now there is also a request for absolute counters. I would love to hear your opinion on that if you feel like joining the discussion.

Sets (as I tried to explain in the docs) are used for distributed counting of events that are unique in some form. The canonical use case is counting logged in users, where the user ID is unique across application servers and can just be sent to StatsD. In that case you don't need to maintain and calculate gauges on every machine. The original Pull Request mentions that this has been expanded to more use cases, maybe @VivienBarousse can give more insight into this.

mrtazz commented Aug 11, 2013

ugh sorry for the delay. You're absolutely right about the gauges delta. However we had some requests for it and a lively discussion on the pull request after which we decided to add this functionality. And now there is also a request for absolute counters. I would love to hear your opinion on that if you feel like joining the discussion.

Sets (as I tried to explain in the docs) are used for distributed counting of events that are unique in some form. The canonical use case is counting logged in users, where the user ID is unique across application servers and can just be sent to StatsD. In that case you don't need to maintain and calculate gauges on every machine. The original Pull Request mentions that this has been expanded to more use cases, maybe @VivienBarousse can give more insight into this.

@VivienBarousse

This comment has been minimized.

Show comment Hide comment
@VivienBarousse

VivienBarousse Aug 15, 2013

The first use case we had for adding sets was to count unique logged in users. The idea is that you can send values identifying a unique event to statsd, and statsd will count the event only if its value hasn't been encountered before. In our case, by sending the user ID as a value, we can count the number of unique logged in users visiting our web site.

However, you can use this system to count any sort of "unique" events:

  • By sending an IP address, you can get the number of unique visitors to your website.
  • By sending API keys, we can count how many clients are using the API.
  • ...

Basically, this can be used to count "unique" events for any definition of "unique". The only constraint is you have to send distinct values for distinct events, and statsd does the disambiguation and reports only unique occurrences of those events.

Hope that helps.

The first use case we had for adding sets was to count unique logged in users. The idea is that you can send values identifying a unique event to statsd, and statsd will count the event only if its value hasn't been encountered before. In our case, by sending the user ID as a value, we can count the number of unique logged in users visiting our web site.

However, you can use this system to count any sort of "unique" events:

  • By sending an IP address, you can get the number of unique visitors to your website.
  • By sending API keys, we can count how many clients are using the API.
  • ...

Basically, this can be used to count "unique" events for any definition of "unique". The only constraint is you have to send distinct values for distinct events, and statsd does the disambiguation and reports only unique occurrences of those events.

Hope that helps.

@mrtazz mrtazz closed this Dec 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment