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

Latest exporter-auto incompatible with latest opentelemetry agent #263

Closed
joao-melo-ingka opened this issue Oct 6, 2023 · 3 comments · Fixed by #267
Closed

Latest exporter-auto incompatible with latest opentelemetry agent #263

joao-melo-ingka opened this issue Oct 6, 2023 · 3 comments · Fixed by #267
Assignees
Labels
bug Something isn't working enhancement accepted An actionable enhancement for which PRs will be accepted priority: p1

Comments

@joao-melo-ingka
Copy link

joao-melo-ingka commented Oct 6, 2023

The following combination:

io.opentelemetry.javaagent:opentelemetry-javaagent:1.30.0 (latest, as of now)
com.google.cloud.opentelemetry:exporter-auto:0.25.2-alpha:shaded (latest, as of now)

Doesn't work.

java.lang.NoClassDefFoundError: io/opentelemetry/javaagent/shaded/io/opentelemetry/semconv/resource/attributes/ResourceAttributes at shadow.com.google.cloud.opentelemetry.detectors.GCPResource.getAttributes(GCPResource.java:62) at shadow.com.google.cloud.opentelemetry.detectors.GCPResource.createResource(GCPResource.java:77) at io.opentelemetry.sdk.autoconfigure.ResourceConfiguration.configureResource(ResourceConfiguration.java:107) at io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdkBuilder.build(AutoConfiguredOpenTelemetrySdkBuilder.java:335) at io.opentelemetry.javaagent.tooling.OpenTelemetryInstaller.installOpenTelemetrySdk(OpenTelemetryInstaller.java:34) at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:121) at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:101) at io.opentelemetry.javaagent.tooling.AgentStarterImpl.start(AgentStarterImpl.java:98) at io.opentelemetry.javaagent.bootstrap.AgentInitializer$1.run(AgentInitializer.java:53) at io.opentelemetry.javaagent.bootstrap.AgentInitializer$1.run(AgentInitializer.java:47) at io.opentelemetry.javaagent.bootstrap.AgentInitializer.execute(AgentInitializer.java:64) at io.opentelemetry.javaagent.bootstrap.AgentInitializer.initialize(AgentInitializer.java:46) at io.opentelemetry.javaagent.OpenTelemetryAgent.startAgent(OpenTelemetryAgent.java:57) at io.opentelemetry.javaagent.OpenTelemetryAgent.premain(OpenTelemetryAgent.java:45) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source) Caused by: java.lang.ClassNotFoundException: io.opentelemetry.javaagent.shaded.io.opentelemetry.semconv.resource.attributes.ResourceAttributes at java.base/java.net.URLClassLoader.findClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 20 more

If I downgrade the opentelemetry java agent to 1.28.0, it works.

@joao-melo-ingka joao-melo-ingka changed the title Latest auto-exporter incompatible with latest opentelemetry agent Latest exporter-auto incompatible with latest opentelemetry agent Oct 6, 2023
@aabmass aabmass added bug Something isn't working priority: p1 enhancement accepted An actionable enhancement for which PRs will be accepted labels Oct 23, 2023
@aabmass
Copy link
Contributor

aabmass commented Oct 23, 2023

Thanks for the report, we'll try to get this fixed soon. If anyone would like to send a PR, please drop a comment

@dashpole dashpole assigned dashpole and psx95 and unassigned dashpole Oct 30, 2023
@psx95
Copy link
Contributor

psx95 commented Nov 9, 2023

Thanks for the issue, I was able to reproduce it locally.

The root cause is mostly the recent breaking changes in the upstream OpenTelemetry Java repo(s). Need to update the dependencies used in the project and fix the breaking changes.

@psx95
Copy link
Contributor

psx95 commented Nov 16, 2023

After #267 got merged, I manually built the auto-exporter from the main branch to make sure it is compatible with the latest OTel agent.

The next release should work with latest OTel agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement accepted An actionable enhancement for which PRs will be accepted priority: p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants