Comments (22)
You should consider using this: https://github.com/codahale/metrics ... it is great.
from spray.
Thanks for the comment.
Yes, "metrics" is a great project.
As is https://github.com/twitter/ostrich ...
Unfortunately both libs somewhat do "too much" and are not "actor enabled".
So currently we are planning to roll our own solution but turn to the existing ones for structure and ideas...
from spray.
We're using Metrics extensively in Actor-based code ... would be really nice to just have this in place. There's really not a big need to replace with something new (and then we'd have to cook up new integration code for Graphite and Nagios and ...)
I'd be happy to assist with a patch to get some of this rolling.
from spray.
Alright, would you be able to provide a few examples on how you use Metrics in your actor code? (preferably on the mailing list)
from spray.
Current thinking: provide a thin adapter layer to Graphite, probably implemented as a singleton actor representing the "gateway" to Graphite.
from spray.
I might have time to show the metrics stuff soon ... what would you want to see?
Metrics talks to Graphite and Ganglia (and JMX). If you want real stats, you'll end up needing a lot of what Metrics provides.
from spray.
Sound cool.
I guess a small example project somewhere would be excellent!
from spray.
Metrics really has come a long way and is nicely modular by now.
No point in trying to roll our own monitoring solution anymore.
We should provide MetricsSupport
trait and a few simple directives to get Metrics support rolling...
from spray.
I've been playing a lot with Metrics lately - I'd be happy to take a first pass at this. Off the top of my head, I can think of a few directives that would be handy
- A directive that acts as a timer so that you can get aggregate performance data on your app
- A directive that acts as a simple counter, so you can get counts
We might want to think about instrumenting the internals of spray with some handy metrics as well - I don't think keeping track of simple rejections would be useful (since I suspect that 90% of them would be red herrings), but certainly logging things like timeouts, completely rejected requests and the like would be interesting to have available.
from spray.
Excellent, David!
We are incredibly busy with all the things we have planned for the 1.0 release, and unfortunately we had to leave this feature off the list. So if you'd like to pick it up, we'd likely be able to support it.
Otherwise we'll have a go at this later...
from spray.
I'm in the middle of instrumenting our app, so I'll have a stab at this in the next few days. How about these directives?
count(couterName: String) { } // Adds a simple counter for every request that comes in
countAll(metricPrefix: String) {} // Adds request counter, meter for request handler (frequency + duration), and counter for responses by type (200, 3xx, 4xx, 5xx)
Measuring the duration of Futures and things like that will be pretty tricky though.
from spray.
I'd say we first try to get the basic metrics abstractions (gauges, counters, histograms, etc.) mirrored by directives and then build more complex things from the basics.
from spray.
Sure, but the directives operate at a level of request and response, right? So we can have primitives but they must be at that level, eg
RequestCounter
ResponseCounter
RequestMeter
InnerRouteDurationHistogram
LastErrorGauge
Etc
On Dec 20, 2012, at 2:09 AM, Mathias [email protected] wrote:
I'd say we first try to get the basic metrics abstractions (gauges, counters, histograms, etc.) mirrored by directives and then build more complex things from the basics.
—
Reply to this email directly or view it on GitHub.
from spray.
Well, I might want to log custom things to metrics from my directives, so something generic underneath is probably the best foundation.
from spray.
If someone already has the ball rolling on this get a link out. I'd like to work on it.
from spray.
Go ahead, don't think anybody has started yet.
-Evan
Carry your candle, run to the darkness
Seek out the helpless, deceived and poor
Hold out your candle for all to see it
Take your candle, and go light your world
On Dec 31, 2012, at 10:44 AM, Curtis Carter [email protected] wrote:
If someone already has the ball rolling on this get a link out. I'd like to work on it.
—
Reply to this email directly or view it on GitHub.
from spray.
Curtis, indeed, as far as I know there is noone working on this issue at the moment. If you have something worthwhile including we'd be more than happy to take a look.
from spray.
Hi people, have you looked at https://github.com/erikvanoosten/metrics-scala ?
from spray.
Hi, I was wondering if this is on your roadmap and if so any idea when we might see the implementation?
from spray.
There is somewhat longer-standing PR: #359
that"s we hope to get to soon...
from spray.
I just closed @derekwyatt's PR #359, which will not make it into spray anymore. Still, we should definitely use it as a basis for any future work on this feature in Akka HTTP.
from spray.
Superseded by akka/akka#16858
from spray.
Related Issues (20)
- Deploying Spray on Amazon ec2
- StackOverflowError in spary.http.Uri
- Nesting of authorize directives not possible? HOT 1
- spray-can socket activation
- Migration to Akka? HOT 3
- Spary Router: GET requests falls into other methods HOT 1
- Cache-Control header not properly supported
- Cookie parsing fails on bad cookie, throws the rest away
- Support media type application/vnd.apple.pkpass
- GzipDecompressor Fails On Files larger than 4g HOT 3
- It is impossible to reject malformed optional form fields with anyParams
- akka2.3.4 HOT 1
- Spray doesn't support RFC 5987 extended parameter notation (eg: for Unicode upload filenames) HOT 5
- spray-routing-shapeless2 1.3.4 jar is missing HOT 3
- Header not set on rejection from authentication directive HOT 3
- scala 2.12 publishing HOT 2
- [Community help required] update for scala 2.12 HOT 3
- user-agent headers are too eager in assuming data format
- http://GET fails with 400 sometime HOT 3
- Getting late response from Spray-Client
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spray.