Class ObservabilityDevToolsHandler
java.lang.Object
com.vaadin.observability.micrometer.devtools.ObservabilityDevToolsHandler
- All Implemented Interfaces:
com.vaadin.base.devserver.DevToolsMessageHandler
public class ObservabilityDevToolsHandler
extends Object
implements com.vaadin.base.devserver.DevToolsMessageHandler
Dev-mode bridge between the live Micrometer
MeterRegistry and the
Vaadin Copilot metrics panel.
Discovered via the Java ServiceLoader by Flow's dev-tools
server (see META-INF/services). It answers two requests from the
browser over the shared dev-tools websocket: a meter snapshot of every
vaadin.* meter, and the insights payload
/actuator/vaadin/observability publishes. This is a developer-only
convenience view; it has no effect in production where the dev-tools
connection does not exist.
The two are separate commands because they are wanted at different times. The meter table is only worth polling while the panel is open, whereas the panel watches for new insights whether or not anyone is looking at it, and that background poll should not snapshot the whole registry every time.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleConnect(com.vaadin.base.devserver.DevToolsInterface devToolsInterface) booleanhandleMessage(String command, tools.jackson.databind.JsonNode data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.base.devserver.DevToolsMessageHandler
handleDisconnect
-
Constructor Details
-
ObservabilityDevToolsHandler
public ObservabilityDevToolsHandler()
-
-
Method Details
-
handleConnect
public void handleConnect(com.vaadin.base.devserver.DevToolsInterface devToolsInterface) - Specified by:
handleConnectin interfacecom.vaadin.base.devserver.DevToolsMessageHandler
-
handleMessage
public boolean handleMessage(String command, tools.jackson.databind.JsonNode data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface) - Specified by:
handleMessagein interfacecom.vaadin.base.devserver.DevToolsMessageHandler
-