IdP metrics: is the SP entityId available?
Cantor, Scott
cantor.2 at osu.edu
Tue Aug 8 11:40:56 EDT 2017
> So an inbound interceptor flow containing a ScriptedAction would have
> access to the MetricContext and the RelyingPartyContext and could
> install such a counter. Did I get it right?
Almost. The point is the MetricContext isn't relevant. That's used to drive some of the built in instrumentation of actions and components in a few places, it isn't the real "home" of the metrics as a whole. If you wanted to install some kind of counter in a scripted action, you'd just use the MetricsSupport helper class directly.
There's an example in the authentication code for tracking success/failure:
MetricsSupport.getMetricRegistry().counter(getMetricName() + ".successes").inc();
You just "do it" basically with the native metrics APIs. Counters in particular are idempotent, you just call counter(name) to get access to it and it creates it if it doesn't already exist.
-- Scott
More information about the users
mailing list