`lein repl` gets stuck when adding opentelemetry agent jar as `:jvm-opts` in a project that has `:java-source-paths`
Opened this issue · 0 comments
Describe the bug
Problem is very simple.
I have a project that is using java classes so i have :java-source-paths
in the project.clj.
I wanted to add open telemetry agent in order to add some observability to the app.
By following documentation i added appropriate jvm-opts for the needs of the project.
After that lein repl
doesn't start and it gets stuck at Compiling 1 source files to <path..>/target/classes
To Reproduce
Steps to reproduce the behavior:
- Go to minimal example project: https://github.com/StankovicMarko/test-agent
- Run the command
lein repl
- See that it's stuck after
Compiling 1 source files to <your path>/target/classes
Actual behavior
Agent is started and you can see metrics exported on http://localhost:9464/metrics
but repl isn't starting.
Commenting out :jvm-opts
and leaving :java-source-paths
- repl starts without a problem
commenting out :java-source-paths
and leaving :jvm-opts
- repl starts without a problem
Expected behavior
Agent is started and repl is started as well.
Link to sample project
https://github.com/StankovicMarko/test-agent
Logs
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[otel.javaagent 2024-06-14 23:54:56:453 +0200] [main] INFO io.opentelemetry.javaagent.tooling.VersionLogger - opentelemetry-javaagent - version: 2.4.0
Compiling 1 source files to <path>/test-agent/target/classes
<stuck at this point>
Environment
- Leiningen Version: Leiningen 2.11.2 on Java 11.0.23 OpenJDK 64-Bit Server VM
- Leiningen installation method: apt
- JDK Version: openjdk 11.0.23 2024-04-16
- OS: Ubuntu 20.04
Additional context
/