vaadin / observability-kit

Other
5 stars 2 forks source link

Support for V14 #143

Closed heruan closed 1 year ago

heruan commented 1 year ago

This issue tracks the progress of adding support to Observability Kit for Vaadin Platform V14.

MatthewVaadin commented 1 year ago

PROBLEM: The HttpStatusCode class is not part of V14 and is used several times within the Kit code and tests.

SOLUTION: Replace with HttpServletResponse constants.

MatthewVaadin commented 1 year ago

PROBLEM: The ApplicationConstants.REQUEST_LOCATION_PARAMETER constant is not part of V14 and is used in JavaScriptBootstrapHandlerInstrumentation and its test.

SOLUTION: Add the value "location" as a constant of the kit class Constants and replace the the usages.

MatthewVaadin commented 1 year ago

PROBLEM: The MockVaadinService class used in the tests does not implement the correct method signatures for V14.

SOLUTION: Implement the correct method signatures (as well as retaining the V23 signatures).

MatthewVaadin commented 1 year ago

PROBLEM: When testing against V14, there is an exception saying that the push mode cannot be null.

SOLUTION: In the MockVaadinService, mock DeploymentConfiguration.getPushMode() to return PushMode.DISABLED.

MatthewVaadin commented 1 year ago

PROBLEM: When testing against V14, the AbstractInstrumentationTest class does not compile. The number of arguments for mockUI.getInternals().showRouteTarget() is incorrect.

SOLUTION: Add a new path argument with value "/test-route".

NOTE: This will cause a compilation error when compiling against V23, so a more permanent solution may be required.

MatthewVaadin commented 1 year ago

PROBLEM: The V14 version of the bakery app does not output any traces.

NO SOLUTION

NOTE: According to some debug output on the SessionRequestHandlerInstrumentation class, the instrumentation hooks are being called (classLoaderOptimization(), typeMatcher(), and transform()), but the onMethodEnter() and onMethodExit() methods are not. Need to investigate further as to why this is.

heruan commented 1 year ago

Delivered in #145