Closed shenlvcheng closed 1 year ago
Opentelemetry java agent does not use arguments passed to premain
or agentmain
we instead use system properties and environment variables to pass configuration to the agent. If you are using runtime attach you can set the system properties via System.setProperty(...)
before attaching the agent.
This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.
How to pass parameters to OpenTelemetry's Java agent in attach mode? I noticed that the first parameter agentArgs in the premain(String agentArgs, Instrumentation inst) method of the source code has been discarded. Why was it discarded, which is preventing me from passing parameters into the Java agent?