Package com.vaadin.observability
Interface ObservabilityClientConfiguration
public interface ObservabilityClientConfiguration
Configuration object used to fine tune the front-end observability for a UI
instance.
It allows to enable, disable and configure built-in client instrumentations,
as well as completely deactivate the functionality.
By default, all instrumentations are enabled.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classRepresents a pattern matching an URL. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an URL pattern that the XMLHttpRequest instrumentation should ignore.default voidaddIgnoredURL(String... url) Adds exact match URL patterns that the XMLHttpRequest instrumentation should ignore.default voidaddIgnoredURLPattern(String... pattern) Adds exact regular expression URL patterns that the XMLHttpRequest instrumentation should ignore.Gets the list of URL patterns to be ignored by XMLHttpRequest instrumentation.Gets the set of browser events traced by User Interaction instrumentation.booleanGets whether the Document Load instrumentation is enabled or disabled.booleanGets whether the front-end observability is enabled or disabled.booleanGets whether the Frontend Error instrumentation is enabled or disabled.booleanGets whether the requests processed by Vaadin are ignored by the XMLHttpRequest instrumentation.booleanGets whether the Long Task instrumentation is enabled or disabled.booleanGets whether the User Interaction instrumentation is enabled or disabled.booleanGets whether the XMLHttpRequest instrumentation is enabled or disabled.voidsetDocumentLoadEnabled(boolean enabled) Enables or disables the Document Load instrumentation.voidsetEnabled(boolean enabled) Sets if the front-end observability should be enabled for the UI instance.voidsetFrontendErrorEnabled(boolean enabled) Enables or disables the Frontend Error instrumentation.default voidsetIgnoredURLs(String... urls) Sets the exact match URL patterns that the XMLHttpRequest instrumentation should ignore.voidSets the URL patterns that the XMLHttpRequest instrumentation should ignore.voidsetIgnoreVaadinURLs(boolean ignore) Sets if requests processed by Vaadin should be ignored by the XMLHttpRequest instrumentation.voidsetLongTaskEnabled(boolean enabled) Enables or disables the Long Task instrumentation.voidsetUserInteractionEnabled(boolean enabled) Enables or disables the User Interaction instrumentation.default voidsetUserInteractionEvents(String... events) Sets the browser events that User Interaction instrumentation should trace.voidsetUserInteractionEvents(Collection<String> events) Sets the browser events that User Interaction instrumentation should trace.voidsetXMLHttpRequestEnabled(boolean enabled) Enables or disables the XMLHttpRequest instrumentation.Creates an exact matchObservabilityClientConfiguration.URLPatternfor the given text.urlPattern(String regex) Creates anObservabilityClientConfiguration.URLPatternfor the given regular expression.
-
Method Details
-
setEnabled
void setEnabled(boolean enabled) Sets if the front-end observability should be enabled for the UI instance.- Parameters:
enabled- true to enabled collection of front-end traces, false to disable it.
-
isEnabled
boolean isEnabled()Gets whether the front-end observability is enabled or disabled.- Returns:
- enabled state of the front-end observability.
-
setDocumentLoadEnabled
void setDocumentLoadEnabled(boolean enabled) Enables or disables the Document Load instrumentation.- Parameters:
enabled- true to enable the instrumentation, false to disable it.- See Also:
-
isDocumentLoadEnabled
boolean isDocumentLoadEnabled()Gets whether the Document Load instrumentation is enabled or disabled.- Returns:
- enabled state of the Document Load instrumentation.
-
setUserInteractionEnabled
void setUserInteractionEnabled(boolean enabled) Enables or disables the User Interaction instrumentation.- Parameters:
enabled- true to enable the instrumentation, false to disable it.- See Also:
-
isUserInteractionEnabled
boolean isUserInteractionEnabled()Gets whether the User Interaction instrumentation is enabled or disabled.- Returns:
- enabled state of the User Interaction instrumentation.
-
setUserInteractionEvents
Sets the browser events that User Interaction instrumentation should trace. Example of events are 'click', 'mousedown', 'touchend', 'play'. By default only 'click' event is instrumented.- Parameters:
events- browser events to instrument
-
setUserInteractionEvents
Sets the browser events that User Interaction instrumentation should trace. Example of events are 'click', 'mousedown', 'touchend', 'play'. By default only 'click' event is instrumented.- Parameters:
events- browser events to instrument
-
getUserInteractionEvents
Gets the set of browser events traced by User Interaction instrumentation. There are no guarantees on the type, mutability, serializability, or thread-safety of the Set returned.- Returns:
- traced browser events.
-
setLongTaskEnabled
void setLongTaskEnabled(boolean enabled) Enables or disables the Long Task instrumentation.- Parameters:
enabled- true to enable the instrumentation, false to disable it.- See Also:
-
isLongTaskEnabled
boolean isLongTaskEnabled()Gets whether the Long Task instrumentation is enabled or disabled.- Returns:
- enabled state of the Long Task instrumentation.
-
setFrontendErrorEnabled
void setFrontendErrorEnabled(boolean enabled) Enables or disables the Frontend Error instrumentation. The instrumentation traces error and unhandled rejection events.- Parameters:
enabled- true to enable the instrumentation, false to disable it.
-
isFrontendErrorEnabled
boolean isFrontendErrorEnabled()Gets whether the Frontend Error instrumentation is enabled or disabled.- Returns:
- enabled state of the Frontend Error instrumentation.
-
setXMLHttpRequestEnabled
void setXMLHttpRequestEnabled(boolean enabled) Enables or disables the XMLHttpRequest instrumentation.- Parameters:
enabled- true to enable the instrumentation, false to disable it.- See Also:
-
isXMLHttpRequestEnabled
boolean isXMLHttpRequestEnabled()Gets whether the XMLHttpRequest instrumentation is enabled or disabled.- Returns:
- enabled state of the XMLHttpRequest instrumentation.
-
setIgnoreVaadinURLs
void setIgnoreVaadinURLs(boolean ignore) Sets if requests processed by Vaadin should be ignored by the XMLHttpRequest instrumentation.- Parameters:
ignore- true to ignore request processed by Vaadin, false to trace them.
-
isIgnoreVaadinURLs
boolean isIgnoreVaadinURLs()Gets whether the requests processed by Vaadin are ignored by the XMLHttpRequest instrumentation.- Returns:
- true if Vaadin requests are ignored, otherwise false.
-
setIgnoredURLs
Sets the URL patterns that the XMLHttpRequest instrumentation should ignore.- Parameters:
urls- URL patterns to be ignored.
-
setIgnoredURLs
Sets the exact match URL patterns that the XMLHttpRequest instrumentation should ignore.- Parameters:
urls- exact match URL patterns to be ignored.
-
addIgnoredURL
Adds an URL pattern that the XMLHttpRequest instrumentation should ignore.- Parameters:
url- the pattern to be ignored.
-
addIgnoredURL
Adds exact match URL patterns that the XMLHttpRequest instrumentation should ignore.- Parameters:
url- exact match URL patterns to be ignored.
-
addIgnoredURLPattern
Adds exact regular expression URL patterns that the XMLHttpRequest instrumentation should ignore.- Parameters:
pattern- regular expression URL patterns to be ignored.
-
getIgnoredURLs
List<ObservabilityClientConfiguration.URLPattern> getIgnoredURLs()Gets the list of URL patterns to be ignored by XMLHttpRequest instrumentation. There are no guarantees on the type, mutability, serializability, or thread-safety of the List returned.- Returns:
- list of ignored URL patterns, never null.
-
url
Creates an exact matchObservabilityClientConfiguration.URLPatternfor the given text.- Parameters:
url- a relative or absolute URL, potentially including the query string.- Returns:
- an exact match
ObservabilityClientConfiguration.URLPatternobject.
-
urlPattern
Creates anObservabilityClientConfiguration.URLPatternfor the given regular expression. The input parameter must represent a valid JavaScript regular expression.- Parameters:
regex- a JavaScript regular expression.- Returns:
- an
ObservabilityClientConfiguration.URLPatternobject for the give regular expression. - See Also:
-