Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GlobalOpenTelemetry is missing public methods #25368

Closed
benjamin-confino opened this issue May 30, 2023 · 0 comments · Fixed by #25409
Closed

GlobalOpenTelemetry is missing public methods #25368

benjamin-confino opened this issue May 30, 2023 · 0 comments · Fixed by #25409
Assignees
Labels
release bug This bug is present in a released version of Open Liberty release:23007

Comments

@benjamin-confino
Copy link
Contributor

Describe the bug
We override GlobalOpenTelemetry to return noop because we don't allow the user to set it and they should use CDI injection to acquire an OpenTelemetry object.

However our override is missing public methods, we need to restore those methods and make them redirect to the no-op OpenTelemetry we return for users who use GlobalOpenTelemetry.

This is an example of hitting the bug:

Caused by: java.lang.NoSuchMethodError: io/opentelemetry/api/GlobalOpenTelemetry.getPropagators()Lio/opentelemetry/context/propagation/ContextPropagators; (loaded from file:/home/gb110303/workspaces/open-liberty/dev/build.image/wlp/lib/io.openliberty.io.opentelemetry_1.0.77.jar by org.eclipse.osgi.internal.loader.EquinoxClassLoader@7be84dfc[io.openliberty.io.opentelemetry:1.0.77.202305162152(id=156)]) called from class io.opentelemetry.opentracingshim.OpenTracingPropagatorsBuilder (loaded from file:/home/gb110303/workspaces/open-liberty/dev/build.image/wlp/usr/servers/Telemetry10Shim/workarea/org.eclipse.osgi/52/data/cache/com.ibm.ws.app.manager_0/.cache/WEB-INF/lib/opentelemetry-opentracing-shim-1.19.0-alpha.jar by com.ibm.ws.classloading.internal.AppClassLoader@76e93c4a).
at OpenTracingPropagatorsBuilder.(OpenTracingPropagatorsBuilder.java:16)
at OpenTracingPropagators.builder(OpenTracingPropagators.java:32)
at OpenTracingShim.createTracerShim(OpenTracingShim.java:61)
at OpenTracingShimServlet.createShim(OpenTracingShimServlet.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Steps to Reproduce
Call an unimplemented public method on GlobalOpenTelemetry.

Expected behavior
Calling a method on GlobalOpenTelemetry should delegate to the no-op OpenTelemetry open

Diagnostic information:

  • OpenLiberty Version: [e.g. 23.0.0.3]
  • Affected feature(s) [e.g. mpTelemetry-1.0]
  • Java Version: N/A
  • server.xml configuration N/A
@benjamin-confino benjamin-confino added the release bug This bug is present in a released version of Open Liberty label May 30, 2023
@benjamin-confino benjamin-confino self-assigned this May 30, 2023
@benjamin-confino benjamin-confino added this to Backlog in MicroProfile UK via automation May 30, 2023
MicroProfile UK automation moved this from Backlog to Done Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release bug This bug is present in a released version of Open Liberty release:23007
Projects
Development

Successfully merging a pull request may close this issue.

2 participants