Add metrics for installed plugins and modules

Description

Add metric gauges for installed plugins and modules. We need to investigate whether the overhead is incurred only when the metric is exposed or any time any of the metrics are accessed.

Environment

None

Activity

Rod Widdowson June 21, 2023 at 10:26 AM

Added the two new metrics beans to https://shibboleth.atlassian.net/wiki/spaces/IDP5/pages/3199510278/MetricsConfiguration .

If we chose to document the two properties which control the HTTP client and secuirty parameters then that is as good a place as any. For the record the properties are currently called idp.updateCheck.httpClient and idp.updateCheck.httpSecurityParameters (and of course they are shared with the class which talks queries the IdP update state at container start.

I’ll resolve this case for now, but not close it. It feels like there will be more work to be done when we start Beta testing

Scott Cantor June 20, 2023 at 4:03 PM

I renamed installedcomponent to installation just for brevity, but I’ll be tweaking names up to the final day so whatever it is for now is fine. I verified that adding this to logback.xml bypasses any of that code, so it’s “safe” for us to ship.

<logger name="metrics.net.shibboleth.idp.installation" level="OFF" />

I am inclined to leave it on by default and make sure that the User Agents we see in the log are useful to us. If we’re going to phone home, let’s be sure it’s helpful. We’ll obviously need to document that in the notes.

Rod Widdowson June 20, 2023 at 2:58 PM

(after which back to me for release notes and doco)

Rod Widdowson June 20, 2023 at 2:58 PM

Documentation pending, but code committed

Name

What

net.shibboleth.idp.modules.list

Map<ModuleId, enabled>

net.shibboleth.idp.installedcomponent.plugins.list

Map<PluginId, InstallableComponentVersion>

net.shibboleth.idp.installedcomponent.plugins.details

Map<PluginId, Record<State, UpdateToVersion>

net.shibboleth.idp.installedcomponent.idp.details

Record<State, UpdateToVersion>>

I have no investment in the names either of the metrics or of the classes so if they are wrong people shgould say so, or just change the code.

Note that with all the above turned on, and with only shibboleth plugins installed collecting the metric set will only go off site twice 9once for the IdP update info and once for all the plugins. The cache of plugin information is cached (including a negative cache).

I’ll ask to review and to add any filters he feels might be needed.

Scott Cantor June 20, 2023 at 1:08 PM

I generally try and use classes because that’s more flexible (it will use toString if there are no serializing rules, but we can plug in rules into Jackson where desired to control it better. So using classes defers the decision longer.

Nulls should be fine.

“Not much” generally, but if there are actionable warnings that’s probably fine.

Done

Details

Assignee

Reporter

Fix versions

Created May 18, 2023 at 8:24 PM
Updated August 26, 2023 at 3:25 PM
Resolved June 21, 2023 at 10:27 AM