Class MetricsCollectorElement
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.observability.micrometer.client.MetricsCollectorElement
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasStyle,Serializable
@Tag("vaadin-metrics-collector")
public final class MetricsCollectorElement
extends com.vaadin.flow.component.Component
Hidden helper component attached to each UI when client metrics are enabled.
Exposes a
ClientCallable that receives batches of
ClientSample from the in-browser collector. Loads the client JS on
first attach and re-attaches itself to its UI if removed.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMetricsCollectorElement(ClientMetricsBinder binder, ObservabilitySettings settings) Deprecated.MetricsCollectorElement(ClientMetricsBinder binder, ObservabilitySettings settings, boolean collectErrorMessages) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidonAttach(com.vaadin.flow.component.AttachEvent event) voidrecordSamples(List<ClientSample> samples) Methods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible, whenAttachedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
MetricsCollectorElement
@Deprecated public MetricsCollectorElement(ClientMetricsBinder binder, ObservabilitySettings settings) Deprecated.useMetricsCollectorElement(ClientMetricsBinder, ObservabilitySettings, boolean), which says whether the browser should gather an error's message and function name. This overload never gathers either, so an application wiring the element up by hand silently loses the detailinsights-detailsasks for. -
MetricsCollectorElement
public MetricsCollectorElement(ClientMetricsBinder binder, ObservabilitySettings settings, boolean collectErrorMessages) - Parameters:
collectErrorMessages- whether the in-browser collector should gather the message of an error it reports — theinsights-detailssetting and something on the server willing to retain one
-
-
Method Details
-
onAttach
protected void onAttach(com.vaadin.flow.component.AttachEvent event) - Overrides:
onAttachin classcom.vaadin.flow.component.Component
-
recordSamples
-
MetricsCollectorElement(ClientMetricsBinder, ObservabilitySettings, boolean), which says whether the browser should gather an error's message and function name.