vaadin / observability-kit

Other
5 stars 2 forks source link

Add license checking to the starter module and remove it from the agent #173

Closed heruan closed 1 year ago

heruan commented 1 year ago

Currently, running an app with the agent attached always checks the license and throws an exception if the check fails:

https://github.com/vaadin/observability-kit/blob/a778401be0e59fc7466f0898e089847ef25ee5e6/observability-kit-agent/src/main/java/com/vaadin/extension/VaadinObservabilityInstrumentationModule.java#L55-L59

License check shouldn't prevent the application to start when in production mode, but we have no means to detect production mode from the agent.

Now that we have the new starter module, we can move the license check there (like other kits do) and require to have that dependency on the classpath for the agent to run, delegating the license check to the starter module (either runtime in development or at build time for production).