-
Notifications
You must be signed in to change notification settings - Fork 48
Experimenting with new ways to provide data to reporters #37
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
base: master
Are you sure you want to change the base?
Conversation
This is a basic attempt at figuring out what it would look like to give some intermediate mechanisms to make reporters simpler.
|
CC: @bernd, @lmarburger |
|
One thing that I've realized is that the |
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.
If we only report like this, it means we won't actually report the marks that happened before the reporter was run for the first time.
Because we know these things are in-process, I think it would actually make more sense to initialize @last with a default of 0 for the hash values:
@last = Hash.new do |h,k|
h[k] = 0
endThere 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.
Agreed.
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.
I'm wondering if it ever makes sense to actually send count... in the cases that I can think of, I don't believe it does.
|
I've just made a couple other changes to possibly make |
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.
This should be :counter_derivative.
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.
The #median method only exists on the snapshot object. This doesn't work. (and #median is already called on the snapshot below)
Same for Timer and Histogram.
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.
Good catch.
|
I'm convinced now that |
|
Okay. I've made some improvements that feel good to me. I have some outstanding issues: 1. FilteringIt seems clear we should implement some sort of filtering — it seems that it should be done in a standard way for all reporters. 2. Metric name changesI've made some changes to some of the metrics that were returned. For instance, before, a gauge called "special.gauge", would be reporting a value as "special.gauge.value". With this change, it now just calls it "special.gauge". The rational was that there was no real benefit of having something appended to the metric name when there is only one value that would be returned. Is this change going to mess people up and bother them? Should I make this optional? 3. Change from sending ratesI've changed the default that is reported to report the number of pieces of work that have been completed in the reporting interval instead of the exponentially weighted rate per second. It does this by recording the last Does it make sense to change the default here? |
|
I pointed our Gemfile to this branch to try this out over the weekend, and deployed it friday evening. Unfortunately, we got no data in librato at all over the weekend. I changed back to the latest metriks gem release (0.9.9.5) and now data is showing up again. So...there's something in here that completely stopped librato from receiving data from us. Not sure what yet. Digging into it now. @eric, if you have any ideas or if this is a known issue, please let me know! |
|
I talked with the librato guys in their campfire room, and they found this in their logs: Looks like the data is being submitted with |
|
I'll look into this shortly. Sorry about that. |
|
Okay. I've fixed the problem and added a test to make sure I don't make the mistake again. Thanks! |
|
👍 Thanks, I'll give it another go. |
Prevent 400 error from librato when submitting an empty body
|
I noticed Librato supports count, sum, min, max, and sum_squares on a gauge. Do we want to take advantage of those as part of this PR? |
|
For which metric types? |
|
I suppose we'd have to switch to reporting count, min, max, etc. for a given duration instead of for the lifetime of the process. |
|
Hey, can I help test this out? I remember we also talked about adding this as a second Librato reporter to at least keep the old behaviour around. What do you think? |
|
There are a couple things that are missing from the librato reporter that I would like to get fixed:
Then the only thing to figure out is a migration strategy for people (if that is needed). The metric names will be changing for people as it is now, which isn't great, but there are a couple issues if they don't change:
To test this, one simple approach would be to point your Gemfile at this branch and run it. |
|
I can look into adding these things, I'm keen to try it out. |
|
My idea was to hold onto a hash of metrics we've sent before, and if the hash doesn't contain a key, send additional That way it won't send larger payloads more often than it may need to. |
…ntation Conflicts: lib/metriks/reporter/librato_metrics.rb
This is a basic attempt at figuring out what it would look like to give some
intermediate mechanisms to make reporters simpler.