Metrics follow-up thoughts

Cantor, Scott cantor.2 at osu.edu
Fri Sep 16 18:48:30 EDT 2016


On 9/16/16, 6:18 PM, "dev on behalf of Brent Putman" <dev-bounces at shibboleth.net on behalf of putmanb at georgetown.edu> wrote:

> 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.

Yeah, I see, it's basically anything code would fetch to record into is idempotent-ish, vs. the callback case.

> Well, there's Method in the reflection API.  Don't know if that's what you mean.

Yes, what I was wondering was whether it's possible to independently create a Gauge if you had a way to represent the callback method as an object.

-- Scott

    



More information about the dev mailing list