Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-9181

Expose EventListenerMBean for monitoring


    • Icon: Story Story
    • Resolution: Done
    • Icon: Neutral Neutral
    • 6.3.0
    • None
    • core
    • Yes
    • Yes
    • Yes

      Jackrabbit provides the org.apache.jackrabbit.api.jmx.EventListenerMBean per observation listener with statistics about observation events. We should register them either with the MBean server info.magnolia.cms.util.MBeanUtil#registerMBean or Dropwizard metrics (info.magnolia.monitoring.MicrometerRegistryProvider).


      • The EventListenerMBean is available from the info.magnolia.observation.WorkspaceEventListenerRegistration.TrackedEventListener, which is a wrapper for EventHandler tracking and exposing observation relevant statistics.
      • We can wrap EventHandlers when they are being registered at info.magnolia.observation.WorkspaceEventListenerRegistration.Registrar#register.
      • We could also wrap them when registering them via info.magnolia.cms.util.ObservationUtil#registerChangeListener and its overloads. However unregistered them is tricker we would need to keep a map from tracked to untracked handlers. A better option might be to remove these methods, which are deprecates since 2016.
      • There seems to be no easy way to register the MBeans for observation listeners registered via ObservationUtil (which is deprecated since 5.4.). Best course of action would be to remove that class and replace remaining usages (which could also be in our modules). Alternatively we could just ignore the listeners registered through it and not expose the MBean for those.

        Acceptance criteria

              mduerig Michael Duerig
              mduerig Michael Duerig
              0 Vote for this issue
              2 Start watching this issue

                Work Started:

                  Task DoD