| Aiden Keating I'm still exploring this approach of adding a custom endpoint, but the metrics data is not bound to the realm. Those are actually two different SPIs: one that collects metrics by intercepting events and one that provides the endpoint. It seems to be possible to write an SPI that implements multiple behaviors and there are examples for that (e.g. https://github.com/keycloak/keycloak/blob/master/examples/providers/user-storage-simple/src/main/java/org/keycloak/examples/userstorage/readonly/PropertyFileUserStorageProvider.java#L45). That's what i'm also trying to do: write an SPI that collects metrics via the EventListenerProvider and exposes an endpoint via the RealmResourceProvider. |