digma-ai / digma-agent

digma agent
0 stars 0 forks source link

User reporting agent not working with Java 23 #37

Open doppleware opened 1 day ago

doppleware commented 1 day ago

See logs reported by user:

This process is enhanced by Digma!
/Users/admin/Library/Java/JavaVirtualMachines/openjdk-23/Contents/Home/bin/java -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dmanagement.endpoints.jmx.exposure.include=* -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=62806:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath /Users/admin/github/api-first-demo/target/classes:/Users/admin/.m2/repository/org/springframework/boot/spring-boot-starter-web/3.4.0-SNAPSHOT/spring-boot-starter-web-3.4.0-20241009.100346-408.jar:/Users/admin/.m2/repository/org/springframework/boot/spring-boot-starter/3.4.0-SNAPSHOT/spring-boot-starter-3.4.0-20241009.100346-408.jar:/Users/admin/.m2/repository/org/springframework/boot/spring-boot/3.4.0-SNAPSHOT/spring-boot-3.4.0-20241009.100346-408.jar:/Users/admin/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.4.0-SNAPSHOT/spring-boot-autoconfigure-3.4.0-20241009.100346-408.jar:/Users/admin/.m2/repository/org/springframework/boot/spring-boot-starter-logging/3.4.0-SNAPSHOT/spring-boot-starter-logging-3.4.0-20241009.100346-408.jar:/Users/admin/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.24.0/log4j-to-slf4j-2.24.0.jar:/Users/admin/.m2/repository/org/apache/logging/log4j/log4j-api/2.24.0/log4j-api-2.24.0.jar:/Users/admin/.m2/repository/org/slf4j/jul-to-slf4j/2.0.16/jul-to-slf4j-2.0.16.jar:/Users/admin/.m2/repository/jakarta/annotation/jakarta.annotation-api/2.1.1/jakarta.annotation-api-2.1.1.jar:/Users/admin/.m2/repository/org/yaml/snakeyaml/2.3/snakeyaml-2.3.jar:/Users/admin/.m2/repository/org/springframework/boot/spring-boot-starter-json/3.4.0-SNAPSHOT/spring-boot-starter-json-3.4.0-20241009.100346-408.jar:/Users/admin/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.18.0/jackson-databind-2.18.0.jar:/Users/admin/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.18.0/jackson-annotations-2.18.0.jar:/Users/admin/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.18.0/jackson-core-2.18.0.jar:/Users/admin/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.18.0/jackson-datatype-jdk8-2.18.0.jar:/Users/admin/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.18.0/jackson-datatype-jsr310-2.18.0.jar:/Users/admin/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.18.0/jackson-module-parameter-names-2.18.0.jar:/Users/admin/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/3.4.0-SNAPSHOT/spring-boot-starter-tomcat-3.4.0-20241009.100346-408.jar:/Users/admin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/10.1.30/tomcat-embed-core-10.1.30.jar:/Users/admin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/10.1.30/tomcat-embed-el-10.1.30.jar:/Users/admin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/10.1.30/tomcat-embed-websocket-10.1.30.jar:/Users/admin/.m2/repository/org/springframework/spring-web/6.2.0-RC1/spring-web-6.2.0-RC1.jar:/Users/admin/.m2/repository/org/springframework/spring-beans/6.2.0-RC1/spring-beans-6.2.0-RC1.jar:/Users/admin/.m2/repository/io/micrometer/micrometer-observation/1.14.0-M3/micrometer-observation-1.14.0-M3.jar:/Users/admin/.m2/repository/io/micrometer/micrometer-commons/1.14.0-M3/micrometer-commons-1.14.0-M3.jar:/Users/admin/.m2/repository/org/springframework/spring-webmvc/6.2.0-RC1/spring-webmvc-6.2.0-RC1.jar:/Users/admin/.m2/repository/org/springframework/spring-aop/6.2.0-RC1/spring-aop-6.2.0-RC1.jar:/Users/admin/.m2/repository/org/springframework/spring-context/6.2.0-RC1/spring-context-6.2.0-RC1.jar:/Users/admin/.m2/repository/org/springframework/spring-expression/6.2.0-RC1/spring-expression-6.2.0-RC1.jar:/Users/admin/.m2/repository/org/springframework/spring-core/6.2.0-RC1/spring-core-6.2.0-RC1.jar:/Users/admin/.m2/repository/org/springframework/spring-jcl/6.2.0-RC1/spring-jcl-6.2.0-RC1.jar:/Users/admin/.m2/repository/ch/qos/logback/logback-classic/1.5.8/logback-classic-1.5.8.jar:/Users/admin/.m2/repository/ch/qos/logback/logback-core/1.5.8/logback-core-1.5.8.jar:/Users/admin/.m2/repository/org/slf4j/slf4j-api/2.0.16/slf4j-api-2.0.16.jar com.example.demo.DemoApplication
Picked up JAVA_TOOL_OPTIONS:  -Ddigma.flavor=Default  -javaagent:/var/folders/sj/xj63ds5d49v5sqmcpvq7drjm0000gn/T/digma-otel-jars/digma-agent.jar -javaagent:/var/folders/sj/xj63ds5d49v5sqmcpvq7drjm0000gn/T/digma-otel-jars/opentelemetry-javaagent.jar -Dotel.javaagent.extensions=/var/folders/sj/xj63ds5d49v5sqmcpvq7drjm0000gn/T/digma-otel-jars/digma-otel-agent-extension.jar -Dotel.exporter.otlp.traces.endpoint=http://localhost:5050 -Dotel.service.name=demo -Dotel.traces.exporter=otlp -Dotel.exporter.otlp.protocol=grpc -Dotel.metrics.exporter=none -Dotel.logs.exporter=none -Dotel.instrumentation.common.experimental.controller.telemetry.enabled=true -Dotel.instrumentation.common.experimental.view.telemetry.enabled=true -Dotel.instrumentation.experimental.span-suppression-strategy=none -Dotel.instrumentation.digma-methods.enabled=false 
Nov 15, 2024 10:30:50 AM org.digma.Log info
INFO: DigmaAgent: starting Digma agent 1.0.27 built on 2024-09-27T11:05:29Z, os: Mac OS X, java version: 23
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[otel.javaagent 2024-11-15 10:30:50:427 +0100] [main] INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 2.1.0
[otel.javaagent 2024-11-15 10:30:50:456 +0100] [main] INFO com.digma.otel.javaagent.extension.DigmaVersionLogger - Digma-Agent-Extension - version: 0.8.16
OpenTelemetry Javaagent failed to start
java.lang.ExceptionInInitializerError
    at io.opentelemetry.javaagent.tooling.muzzle.AgentTooling.<clinit>(AgentTooling.java:23)
    at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:151)
    at io.opentelemetry.javaagent.tooling.AgentInstaller.installBytebuddyAgent(AgentInstaller.java:103)
    at io.opentelemetry.javaagent.tooling.AgentStarterImpl.start(AgentStarterImpl.java:99)
    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.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    at java.base/java.lang.reflect.Method.invoke(Method.java:580)
    at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:560)
    at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:572)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.findLoadedClass(java.lang.String) accessible: module java.base does not "opens java.lang" to unnamed module @7c16905e
    at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:388)
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:364)
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:312)
    at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:203)
    at java.base/java.lang.reflect.Method.setAccessible(Method.java:197)
    at io.opentelemetry.javaagent.tooling.muzzle.AgentCachingPoolStrategy.getFindLoadedClassMethod(AgentCachingPoolStrategy.java:115)
    at io.opentelemetry.javaagent.tooling.muzzle.AgentCachingPoolStrategy.<clinit>(AgentCachingPoolStrategy.java:58)
    ... 14 more
shalom938 commented 22 hours ago

otel agent 2.1.0 doesn't work with java 23. 2.10.0 does. see issue https://github.com/digma-ai/digma-intellij-plugin/issues/2602