Class InteractionCollector
java.lang.Object
com.vaadin.observability.micrometer.insights.InteractionCollector
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final longAbsolute per-interaction latency budget for good UX, in milliseconds. -
Constructor Summary
ConstructorsConstructorDescriptionInteractionCollector(RecentInteractions buffer, ObservabilitySettings settings) -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registrationregister(com.vaadin.flow.server.VaadinServiceEventBus eventBus) Subscribes to the RPC invocation events on the given bus.
-
Field Details
-
UX_BUDGET_MS
public static final long UX_BUDGET_MSAbsolute 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
-
InteractionCollector
-
-
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
-