-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Metrics/librato #976
Metrics/librato #976
Conversation
The comment is wrong but the behavior is correct: Add should create a new incremented observation. Comment should be
|
OK, I will change it back. My use case: So I was thinking of the way as |
Each point in the lv vectorspace represents not a single value but a timeseries, a sequence of values collected over time. Operations on points in the vectorspace (Set, Add, Observe, ...) always append values to the timeseries. The Add method is a bit unique in that the value that it appends is a function of the previous value, which is why that extra code is necessary.
I don't quite understand the point you're making. Sending one metric or sending a batch of metrics shouldn't depend on how Go kit represents timeseries data in memory. Specifically, with a gauge, if all you care about is the current value at a given time, and you don't care about the history of those values, then you can just take the last value in the |
Should you even be using the |
Librato has the support of |
So maybe just use Librato Counters and Gauges directly, without lv stuff? |
I also wanted to be able to do some client-side aggregation, to be able to save a bit on the number of metrics/requests sent to librato. All the lv stuff seemed handy for that purpose. For some metrics, I need to be able to do So for averages, I used One of the solutions I had in mind is creating similar |
I reverted that commit about So, for But I still need the Gauge that can be aggregated as sum of values over period of time. In ordered to do so, I added new space Please, let me know, what you think, and I will try to test it on real librato account tomorrow. |
5ea02dd
to
1ce2e31
Compare
1ce2e31
to
6c41e58
Compare
Hey, @peterbourgon I tested this on the real account, added some comments and improvements and now it is ready! Please, take a look when you have time. Thanks! |
Hey @peterbourgon. |
@trane9991 I don't want to speak for @peterbourgon , but lately Go kit doesn't accept any more changes like this in the core. There is no reason why a library like this would have to live there. So I'd suggest releasing this as a separate library and then open a PR to the README to link to your project. Also see #843 for future plans. |
Second @sagikazarmark. Sorry. |
This PR adds librato client.
Important, this is a client for Librato source metrics and NOT new Librato tagged metrics.
The problem that it is impossible to migrate fro source to target metrics without of creation of a new Librato account (and data loss), so plenty of people uses source metrics.
However, API seems pretty similar, so this package potentially may be modified to use any of the APIs.
Some additional fixes:
FillCounter
could generaten == 0
which didn't add any values to the counter, which made some tests unreliable.