vaadin / observability-kit

Other
5 stars 2 forks source link

Reconfigure ObservabilityClient without reloading the page. #194

Open mcollovati opened 1 year ago

mcollovati commented 1 year ago

Currently, ObservabilityClient is added to the UI by an UIInitListener, so potential configuration changes take effect only after a page reload.

It would be good to provide a way to modify the ObservabilityClient behavior without the need for the page reload.

A potential solution may be to have an event for configuration change and attach a listener for that event to the UI. Once the event is fired, the listener may remove the old client instance and replace it with a new one (or the client-side of the ObservabilityClient may be able to reconfigure itself on property changes). The configuration changes should then be immediately propagated to the client if PUSH is enabled, or after the first user interaction, but without the need of a page reload.