functions-framework-java
functions-framework-java copied to clipboard
Thread Context ClassLoader not set when invoking handler constructor
Commit a3d23cc12df52cb10ee0102e50cd54eb943527e6 ensured that the thread context class loader is set when invoking the service method. However, the context class loader is currently still not set when invoking newInstance, causing, for example, issues with OpenTelemetry (https://github.com/open-telemetry/opentelemetry-java/issues/3634).
See here for newInstance call:
https://github.com/GoogleCloudPlatform/functions-framework-java/blob/b3399424972e1d3534b0bd1e43cce04fbcc4afa8/invoker/core/src/main/java/com/google/cloud/functions/invoker/HttpFunctionExecutor.java#L51