Tsz-wo Sze created RATIS-2641:
---------------------------------

             Summary: OpenTelemetryAgent not found when running examples
                 Key: RATIS-2641
                 URL: https://issues.apache.org/jira/browse/RATIS-2641
             Project: Ratis
          Issue Type: Improvement
          Components: examples, trace
            Reporter: Tsz-wo Sze


Got the following exception, when testing 3.3.0-rc2.  
{code}
apache-ratis-3.3.0-bin % ./examples/bin/client.sh arithmetic assign -r $PEERS 
--name a --value 4
Found 
/Users/szetszwo/ratis/release/3.3.0/apache-ratis-3.3.0-bin/examples/lib/ratis-examples-3.3.0.jar
Using OTEL_OPTS: 
-javaagent:/Users/szetszwo/ratis/release/3.3.0/apache-ratis-3.3.0-bin/examples/bin/../../lib/trace/opentelemetry-javaagent-2.29.0.jar
 -Dotel.resource.attributes=service.name=ratis.client 
-Dotel.traces.exporter=logging -Dotel.metrics.exporter=none 
-Dotel.logs.exporter=logging -Draft.otel.tracing.enabled=true
ERROR io.opentelemetry.javaagent.OpenTelemetryAgent
java.lang.IllegalStateException: The agent was not installed, because the agent 
was found in 
'/Users/szetszwo/ratis/release/3.3.0/apache-ratis-3.3.0-bin/examples/lib/ratis-examples-3.3.0.jar',
 which doesn't contain a Premain-Class manifest attribute. Make sure that you 
haven't included the agent jar file inside of an application uber jar.
        at 
io.opentelemetry.javaagent.OpenTelemetryAgent.verifyJarManifestMainClassIsThis(OpenTelemetryAgent.java:116)
        at 
io.opentelemetry.javaagent.OpenTelemetryAgent.installBootstrapJar(OpenTelemetryAgent.java:97)
        at 
io.opentelemetry.javaagent.OpenTelemetryAgent.startAgent(OpenTelemetryAgent.java:56)
        at 
io.opentelemetry.javaagent.OpenTelemetryAgent.premain(OpenTelemetryAgent.java:46)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:569)
        at 
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:491)
        at 
java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:503)
2026-08-04 13:31:42 INFO  GrpcConfigKeys:62 - 
raft.grpc.client.worker-group.size = 0 (default)
Aug 04, 2026 1:31:42 PM org.apache.ratis.thirdparty.io.grpc.netty.TcpMetrics 
loadEpollInfo
INFO: Epoll available during static init of TcpMetrics:false
Success: true
Response: class org.apache.ratis.protocol.Message$1
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to