--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany | +49 173 6395215
Managing Director: Alexander Ljung | Incorporated in England & Wales with Company No. 6343600 | Local Branch Office | AG Charlottenburg | HRB 110657BThe only caveat is that the buckets are fixed (per histogram – so you need to specify whatever is interesting to you) – this allows aggregating over them from many instances.Hey,we typically use histograms to record timings – in the Java client library there is even a Timer wrapper for it:
http://prometheus.io/client_java/io/prometheus/client/Histogram.Timer.html
/MR
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Matthias Rampke
EngineerSoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany | +49 173 6395215
Managing Director: Alexander Ljung | Incorporated in England & Wales with Company No. 6343600 | Local Branch Office | AG Charlottenburg | HRB 110657B
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
Is there anything on the roadmap for annotations in the java client?
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Prometheus Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/prometheus-developers/gnvvYvXVaGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to prometheus-devel...@googlegroups.com.
I think we could use AOP to do that without bytecode level instrument. Both Guice and Spring support AOP for method interceptions. That should not be hard.
On Sun, Aug 23, 2015 at 11:04 AM, Brian Brazil <brian....@robustperception.io> wrote:On Sat, Aug 22, 2015 at 11:59 PM, Daniel Barker <barke...@gmail.com> wrote:Is there anything on the roadmap for annotations in the java client?From what I know it'd require a java agent to mess around with bytecode, so that's not something easy to add or maintain and would likely pull in quite a few big dependencies (which is a problem for some users). If someone wants to look into making this work we can discuss it.Brian
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Brian Brazil--
You received this message because you are subscribed to a topic in the Google Groups "Prometheus Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/prometheus-developers/gnvvYvXVaGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Are the dropwizard metrics manipulating byte code?
Makes sense. Thanks Brain. I think another function that would require explicit dependencies on Guice or Spring should be on a separate project, prometheus-client-guice etc.
Just Off the topic, another beginners question, how do I configure the client to output the metrics reports to log files? I may want to log metrics to files as well as promethues servers, or one not the other.
Are the dropwizard metrics manipulating byte code?
Not that I am aware of.Dropwizard metrics provides a set of annotation definitions (Timed, Gauge, Counted ... etc) in a standalone module. None of the Dropwizard core modules actually do anything with them. Its up to individual specific modules to put those annotations into usage. There are individual specific modules that use those annotation to instrument code. For example, the "Metrics-jersey2" module will support all those annotations to be used on Jersey rest services. Thats probably the only one in the codebase that actually uses those annotationsFor the metrics-jersey implementation, the annotation to registering process is done via event listener callbacks, as supported by Jersey. So no bytecode manipulation is needed.
There is project outside of Dropwizard codebase, "Metrics-Spring", use Spring AOP to intercept method calls and once found those annotations, will register corresponding metrics. So, again, no bytecode manipulation or java agent is needed.
Cheers,
Jimmi
Another option could be annotation processors, generating code at compile time with normal Java compiler. No runtime dependencies outside of the normal Prometheus client lib, just add annotations for compile time processing?
Cheers,
Jimmi
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
That is the normal use of it yes, but there are ways & means as evidenced by Project Lombok. Details of the approach at http://notatube.blogspot.co.uk/2010/11/project-lombok-trick-explained.html. There is potential for breakage, but it's worked for Lombok for a number of years now. But yeah it's probably not very good engineering practice to do it this way, even if it does work...
On Thu, 24 Sep 2015 at 17:13 Brian Brazil <brian....@robustperception.io> wrote:On Thu, Sep 24, 2015 at 4:54 PM, <jimmi...@gmail.com> wrote:Another option could be annotation processors, generating code at compile time with normal Java compiler. No runtime dependencies outside of the normal Prometheus client lib, just add annotations for compile time processing?From a read through the docs that can generate code for new classes, but not alter the annotated code so it doesn't seem to be of much use here. Am I missing something?Brian
Cheers,
Jimmi
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.