public final class AgentMain extends Object
To enable the *OpenCensus Agent for Java* for your application, add the option -javaagent:path/to/opencensus-contrib-agent.jar to the invocation of the java executable
as shown in the following example:
java -javaagent:path/to/opencensus-contrib-agent.jar ...
| Modifier and Type | Method and Description |
|---|---|
static void |
premain(String agentArgs,
Instrumentation instrumentation)
Initializes the OpenCensus Agent for Java.
|
public static void premain(String agentArgs, Instrumentation instrumentation) throws Exception
agentArgs - agent options, passed as a single string by the JVMinstrumentation - the Instrumentation object provided by the JVM for instrumenting
Java programming language codeException - if initialization of the agent failsjava.lang.instrument