1
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 5 years have passed since last update.

IntellijでKamonを使う

Last updated at Posted at 2016-12-09

前提

  • Intellij IDEA Ultimate 2016.3
  • sbt 0.13.13
  • Kamon 0.6.3
  • aspectjweaver 1.8.9

IntelliJでRun/Debug ConfigurationsのApplicationでプログラムを動かしているとする

※ sbtでkamonの設定をした場合、オプションにfork in run := trueを指定しなければならないが、これを入れるとIntelliJのDebug実行時にブレークポイントで止まらなくなったため

build.sbt

適当に使いたいkamonを追加する

libraryDependencies ++= {
  val kamonv= "0.6.3"

  Seq(
    ...
    //メトリクス用
    "org.aspectj" % "aspectjweaver" % "1.8.9",
    "io.kamon" %% "kamon-core" % kamonv,
    "io.kamon" %% "kamon-akka" % kamonv,
    "io.kamon" %% "kamon-datadog" % kamonv,
    ...
  )
}

Run/Debug Configurations

ApplicationのVM optionsに以下のオプションでaspectjweaverのパスを指定する(パスは一例)

-javaagent:"C:\Users\xxx\.ivy2\cache\org.aspectj\aspectjweaver\jars\aspectjweaver-1.8.9.jar"

Run/Debugで実行する

1
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
1
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?