Class ComponentResolver
java.lang.Object
com.vaadin.observability.micrometer.ComponentResolver
Resolves the
Component an RPC invocation
targets. Shared by the instrumentation that enriches spans and the insights
collector that records interactions.-
Method Summary
Modifier and TypeMethodDescriptionresolveComponentType(com.vaadin.flow.server.communication.AbstractRpcInvocationEvent event) Resolves the class name of the component the invocation targets, by looking up the targetStateNodein the UI's state tree and walking up to the nearest enclosing component.
-
Method Details
-
resolveComponentType
public static Optional<String> resolveComponentType(com.vaadin.flow.server.communication.AbstractRpcInvocationEvent event) Resolves the class name of the component the invocation targets, by looking up the targetStateNodein the UI's state tree and walking up to the nearest enclosing component. ReturnsOptional.empty()if the invocation does not target a node, the node is no longer attached, or no component can be resolved. Resolution is best-effort enrichment and never throws.- Parameters:
event- the RPC invocation to resolve the target component for- Returns:
- the fully-qualified component class name, or empty
-