-
Notifications
You must be signed in to change notification settings - Fork 174
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
Add go-metrics listeners for metric syndication #127
base: master
Are you sure you want to change the base?
Conversation
Hey @redhotpenguin! This looks interesting! @aditya-stripe and I will take a look today. I'm not familiar with go-metrics so will need to do some sleuthing. 😄 |
Ok, maybe not today, but soon. 😸 |
Sounds good, no rush 😄 |
Hey @redhotpenguin! Sorry for the delay, but I had some other projects to finish up on Friday! So from what I can tell, this PR intends to leverage go-metrics' (I didn't really read it thoroughly yet, just investigated go-metrics! |
Yes, this PR uses the Let me know if that perspective helps - we have a bit of a potpourri of tools which inspired this work, which might not be for everyone. This feature would basically give developers, operators, and data scientists access to the same data rather than writing it to several different systems from the applications. |
Thanks for the clarification. As you astutely pointed out in your opener, this required some manipulation on your part because our interfaces for it aren't great. I want to spend some time chatting with @aditya-stripe and the rest of the team to see if we can maybe make this easier or leverage your work as the opening salvo in an effort to make Veneur pluggable in this manner. |
Thanks for submitting this @redhotpenguin! This is in line with some work that we've been planning on doing, to make our metric interfaces better. Would you mind giving us write access to this feature branch (there's a option on the PR, or the repo itself)? That way we can keep this branch in sync with those changes, without having to block one on the other - and we can also take care of resolving the merge conflicts ourselves. |
Thanks @ChimeraCoder, I've added you and @cory-stripe as collaborators to my fork. I'm got a few tuits still to ensure these changes work well under load, if I have any additions I'll post a branch of this fork for review. |
This would be very handy for own environment but the PR hasn't been updated recently. What is the status of this? Thank you |
Good question! Sorry for the radio silence. We've not integrated this change because we have plans to abstract the metrics flushing code to not be so dependent on Datadog. Basically, make Veneur agnostic about this work. We've gotten involved in other work, however, and this hasn't been a priority. We do intend to pull this in, but I have no ETA at present. |
Thanks for the update here; I have some tuits freeing up soon and can put some additional work into it on this direction if that helps! |
It might not hurt, I just hate to have you poke at something if we internally go in another direction. At present you can find some work in There's some hink tho, in that the in-memory metric is called a "DDMetric" and that stuff should likely be changed. But if you have some ideas for tweening us to that stage we'd certainly thoroughly appreciate any effort there. I'd encourage you to keep your PRs small jic. Again, I really want to avoid having our internal work conflict to as not to waste your time! |
Go-metrics provides a MetricSink interface which supports metrics delivery to several different types of backends. These changes add a set of listeners to veneur which use the MetricSink interface to deliver the UDPMetric packets to the go-metrics backends for syndication of the veneur metrics.
Gerald Rule: Copy Observability on Veneur and Unilog pull requestscc @stripe/observability |
Thanks for the tips. I went ahead and rebased, and resolved a couple of conflicts in config.go and example.yaml. The current PR should be up to date with master. |
Excellent, thanks @redhotpenguin. I started hacking on some changes to make this easier last night. We'll get there! |
How are things going for this PR? Thanks! |
Still making progress! We merged a few PRs last week that are continuing a refactor. |
Just checking back in. How's it going? |
It's going! We're closer now with #292 merged. I've been on a different project this week and haven't been able to spend time unifying this, but you can expect PRs consolidating the various plugin/sink combinations over the next few weeks from which this PR will gain steam. Again, sorry for the delay but we really wanted this to be the best it could be! |
|
Just signed the CLA. Ready to merge! (Lol) |
Work in progress. Looking for feedback on the work done so far.
Go-metrics provides a MetricSink interface which supports metrics
delivery to several different types of backends. These changes add a
set of listeners to veneur which use the MetricSink interface to
deliver the UDPMetric packets to the go-metrics backends for
syndication of the veneur metrics.
Summary
Added a listener package which uses the go-metrics package to syndicate UDPMetrics to different backends via a MetricSink interface. Created backend implementations for Circonus, Datadog (yeah this is redundant, but go-metrics supports it so why not), Prometheus, and Statsd listeners. There's a few other go-metrics backends that can be added later.
Initially I looked at using the plugin system in veneur, but ended up going with the listener approach so I had access to the UDPMetric data via a channel. There may be a better name for these workers than
listeners
, perhapsbackends
? Code has been golinted and hopefully conform with veneur style expectations.Motivation
We use a few different monitoring systems at work, and being able to syndicate data to several of them via veneur agents would simplify our code and open up a lot of possibilities for comparison and analysis between those systems.
Test plan
Unit tests for the
NewListener()
constructor have been added. Probably a good idea to add tests for theListen()
function also, will require some mocking.Have tested in a development environment with Statsd and Circonus backends and verified data syndication is working as expected. Need to verify that listener writes won't block
HandleMetricPacket()
at load and degrade performance. Need to test the Prometheus backend.Rollout/monitoring/revert plan
Listeners must be specified in the configuration file, so veneur should behave normally if no listeners are configured.