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
@JsModule("./VaadinMetricsClient.js")
@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, whose script defines the
element and starts collecting once it is attached. 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
Methods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, getUIOrThrow, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, 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
-
recordSamples
-
MetricsCollectorElement(ClientMetricsBinder, ObservabilitySettings, boolean), which says whether the browser should gather an error's message and function name.