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

    Constructors
    Constructor
    Description
    Deprecated.
    use MetricsCollectorElement(ClientMetricsBinder, ObservabilitySettings, boolean), which says whether the browser should gather an error's message and function name.
    MetricsCollectorElement(ClientMetricsBinder binder, ObservabilitySettings settings, boolean collectErrorMessages)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    onAttach(com.vaadin.flow.component.AttachEvent event)
     
    void
     

    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, whenAttached

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Constructor Details

  • Method Details

    • onAttach

      protected void onAttach(com.vaadin.flow.component.AttachEvent event)
      Overrides:
      onAttach in class com.vaadin.flow.component.Component
    • recordSamples

      @ClientCallable public void recordSamples(List<ClientSample> samples)