0

I am trying to use Google Cloud Stackdriver 1) Debugger , 2) Profiler together for the server deployed outside Google Cloud.

I got the Stackdriver debugger working fine. I am able to add debug agent the following way:

-agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/mydirtoclassdirectory

Now I am trying to add a new agent which will be for a profiler which docs mentions done the following way:

-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=myservice,-cprof_service_version=1.0.0 \
[JAVA OPTIONS] -jar PATH/TO/YOUR/JARFILE [PROGRAM OPTIONS]

But how to add two different agents (profiler_java_agent.so and cdbg_java_agent.so) in single agentpath?

Profiler docs: https://cloud.google.com/profiler/docs/profiling-java

Debugger docs: https://cloud.google.com/debugger/docs/setup/java

manntsheth
  • 440
  • 6
  • 8

1 Answers1

0

This doesn't seem possible in a single agent path. I will recommend using a multiple agent paths:

Example: java -agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=myApp -jar myApp.jar -agentpath:/opt/cdbg/cdbg_java_agent.so=--cdbg_extra_class_path=/mydirtoclassdirectory

See fluentd documentation on how to define multiple paths. Also note that string varies as per the application.

Sunny J
  • 453
  • 2
  • 14