-
Notifications
You must be signed in to change notification settings - Fork 596
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
Server statistics in Akka HTTP #107
Comments
Back in 2013, in the first PR for what is now Akka IO (akka/akka#1030), I was proposing to port over the simple metrics code we used to have in spray-io back then:
So, my understanding is that, if things haven't changed, it's a general policy to not include any kind of stats/metrics code within the Akka modules themselves. |
OK, fair enough, but if that's the plan, then there need to be extension points where I can weave in my own preferred stats library. I suppose it'll be something like a custom I'll submit a docs PR if I get this working. |
Hmm -- there's quite a bit of finessing around atomicity / race conditions in the StatsSupport class in Spray (100+ lines). I suppose I need to copy and paste all of that into my app to do this in userland? Is this really something we want people to be copy+pasting from the Akka docs? I'll try doing that and see how that docs PR might look. |
I’ve reimplemented the Spray HTTP stats in “userland” in my app, and a docs PR to Akka would look something like the following. I think there are a couple of issues which make this unsuitable for a “recipe” in the docs for users to copy and paste into their apps:
If you’re sure this belongs in the docs and not in the framework, I can convert this draft into a PR to the docs RST files: Proposed new documentation section starts here: Server HTTP statisticsTo allow for users to connect to their own preferred statistics libraries, Akka HTTP does not have any built-in statistics monitoring. Add the following class to your application:
Change the server “
Now you can call |
Hi @viktorklang / @sirthias -- please could you take a look at this when you have a moment? I have two open questions:
Thanks, Rich |
Hi @RichardBradley, I'm unfortunately out of cycles for the moment, @rkuhn, could you have a look when you have a cycle or two to spare? |
We are very busy working towards HTTP 1.0-RC1 this week, will revisit this topic afterwards. In any case thanks for sharing your work! |
OK, thanks, that's fine. I had previously thought this might be part of HTTP 1.0, to give feature parity with Spray 1.3, but I now agree it's fairly low priority. Take a look when you have time. |
Do we have any solution for monitoring Akka HTTP? Any way to track metrics? |
Please use the akka-user mailing list for general questions, tickets are reserved for actionable code related things @gauravkumar37. Lightbend monitoring tracks advanced things about Akka, we'll eventually add HTTP features to it (including tracing). |
Link in OP is broken, here is a fresh one to Server Statistics in the spray documentation. |
I'm probably late to the party but, why don't we unify the metric names to be the same as the ones in finagle, it will definitely go long way in organisations which have standardised components and metrics based on the finagle stack? |
@schrepfler Not sure what you mean, akka-http currently doesn't expose any metrics itself. Are you talking about the kamon exposed metrics? |
That's what I'm saying, it would be really good if akka-http has a standard way to expose metrics so that customers have a choice to map the stats onto whatever they want. Unifying metrics brings a lot of value to stacks which are based on same core technology (like finagle) so whatever the service is, we always get the same stats so it's easy to drag and drop services and have generic dashboards out of the box. |
Monday Mar 30, 2015 at 10:44 GMT
Originally opened as akka/akka#17095
Spray 1.3 had "Server Statistics" that reported on various connection-level stats that are difficult or inefficient to monitor in userland:
Please could we add something similar to Akka HTTP 1.0?
The text was updated successfully, but these errors were encountered: