0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Maven の mvn exec:java で実行した java のプログラムを datadog agent によりお手軽に Profile する方法

Last updated at Posted at 2020-11-26

MAVEN_OPTS に、

の、

Screen Shot 2020-11-27 at 0.20.40.png

で作った -javaagent の snipet を指定する。

export MAVEN_OPTS="-javaagent:/path/to/dd-java-agent.jar -Ddd.profiling.enabled=true -Ddd.logs.injection=true -Ddd.trace.sample.rate=1 -Ddd.service=YOURAPPNAME -Ddd.env=dev"

mvn install; mvn compile; mvn exec:java -Dexec.mainClass=YOURAPPCLASS -Dexec.args="arg1 arg2"

その後 Datadog の Web 画面から APM -> Profile にて、

Screen Shot 2020-11-27 at 0.34.42.png

のような画面が確認できる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?