Class InteractionCollector

java.lang.Object
com.vaadin.observability.micrometer.insights.InteractionCollector

public class InteractionCollector extends Object
Captures interesting client-to-server invocations as CapturedInteractions: failed ones (when error metrics are enabled) and ones slower than the UX budget (when request metrics are enabled).

Listens for the RPC invocation events on the service event bus, the same events RpcMetricsBinder uses for RPC spans: RpcInvocationFailedEvent delivers the exact "user action + exception" pair, timing between RpcInvocationStartedEvent and RpcInvocationEndedEvent gives the handling duration, and the events carry the target state node from which the interacted component is resolved. Works in production mode.

  • Field Details

    • UX_BUDGET_MS

      public static final long UX_BUDGET_MS
      Absolute per-interaction latency budget for good UX, in milliseconds. Beyond roughly one second a user loses the feeling of operating directly on the UI, so interactions over this budget are captured as interactions regardless of any historical baseline.
      See Also:
  • Constructor Details

  • Method Details

    • register

      public com.vaadin.flow.shared.Registration register(com.vaadin.flow.server.VaadinServiceEventBus eventBus)
      Subscribes to the RPC invocation events on the given bus.
      Parameters:
      eventBus - the service event bus to listen on
      Returns:
      a handle removing every subscription made here