Metrics follow-up thoughts
Brent Putman
putmanb at georgetown.edu
Fri Sep 16 18:18:43 EDT 2016
On 9/16/16 5:54 PM, Cantor, Scott wrote:
>
>> Just so as to not mix and conflate the actual logging config and the metrics, might want
>> to optionally auto-prepend a separate prefix or something for the metrics categories. So
>> logging and metrics categories are really separate.
> Yes, I had straw-man'd net.shibboleth.idp.metric rather than net.shibboleth.idp in my example.
I was actually thinking more like metrics.net.shibboleth.idp, so that
the metrics are in their own completely separate package "bucket" and
can be turned on/off as a unit, or subunits, distinct from logging.
But I suppose it really just depends on how you want to optimize the
enabling and disabling vis-a-vis the actual logging config.
>
>> No, I don't see any docs. I just noticed the code. So you're right in that it might not
>> be guaranteed.
> I think counter() is, the others are not. They mention it in the guide, and now that I understand Gauge better, I see the reason.
Actually, all 4 of counter(), histogram(), meter() and timer() are
implemented exactly the same. The Gauge (and I guess any Metric) that
you do with register() is the oddball, it seems to throw an
IllegalArgumentException on an existing name.
>
> Since Gauge is an interface, you don't really create it in the same way as a named counter,
Yeah it seems to essentially be a callback function.
> I dunno if Java has method objects you can pass around? I seem to recall it does...
Well, there's Method in the reflection API. Don't know if that's what
you mean.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20160916/b7229ddc/attachment-0001.html>
More information about the dev
mailing list