Class InteractionCollector
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.
In development mode it additionally reads what is on the screen: the caption
of the interacted component, and the values its view was
holding, so that the replay of an insight names the button the
reader is looking for and states what the failure needed to be set. Neither
is collected in production, where the payload is meant to be forwarded and
both would carry application text — see ComponentCaptions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longAbsolute per-interaction latency budget for good UX, in milliseconds. -
Constructor Summary
ConstructorsConstructorDescriptionInteractionCollector(RecentInteractions buffer, ObservabilitySettings settings, boolean developmentMode) -
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
public InteractionCollector(RecentInteractions buffer, ObservabilitySettings settings, boolean developmentMode) - Parameters:
buffer- where captured interactions are retainedsettings- the kit's settings, for which interactions to capture and how much detail they may carrydevelopmentMode- whether the application runs in development mode, which is where component captions and the state of the view are collected
-
-
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
-