vaadin / observability-kit

Other
5 stars 2 forks source link

fix(agent): avoid touching default constructor #225

Closed Lodin closed 1 year ago

Lodin commented 1 year ago

This PR fixes the issue with the issue when the ObservabilityEndpoint instrumentation is not working. The issue was caused by ByteBuddy patching the default constructor of the endpoint which is forbidden by Spring. So the endpoint is simply discarded during instantiation.

I moved the exporter field update to the start of the export method. It is executed each time but I guess it is ok while it works. I also tried to use a static field instead but it causes issues with ExportMethodAdvice class availability outside of the agent class loader.

Lodin commented 1 year ago