diff options
author | Ivan Topolnak <ivantopo@gmail.com> | 2013-11-13 11:48:55 -0300 |
---|---|---|
committer | Ivan Topolnak <ivantopo@gmail.com> | 2013-11-13 11:48:55 -0300 |
commit | b4d9c10e714b69b7dc07e52d5ef53a17e32f0d58 (patch) | |
tree | 1eb25cce4d589d2d55b2ed5d1064e3401d4ee2e8 /kamon-newrelic/src/main/scala/kamon/newrelic | |
parent | c25c3ad9db1f92ab61da1e4bfc98001efae85b0f (diff) | |
download | Kamon-b4d9c10e714b69b7dc07e52d5ef53a17e32f0d58.tar.gz Kamon-b4d9c10e714b69b7dc07e52d5ef53a17e32f0d58.tar.bz2 Kamon-b4d9c10e714b69b7dc07e52d5ef53a17e32f0d58.zip |
Include UOW in NewRelic error reports
Diffstat (limited to 'kamon-newrelic/src/main/scala/kamon/newrelic')
-rw-r--r-- | kamon-newrelic/src/main/scala/kamon/newrelic/NewRelicErrorLogger.scala | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kamon-newrelic/src/main/scala/kamon/newrelic/NewRelicErrorLogger.scala b/kamon-newrelic/src/main/scala/kamon/newrelic/NewRelicErrorLogger.scala index 872f4fab..fbd0a461 100644 --- a/kamon-newrelic/src/main/scala/kamon/newrelic/NewRelicErrorLogger.scala +++ b/kamon-newrelic/src/main/scala/kamon/newrelic/NewRelicErrorLogger.scala @@ -4,7 +4,7 @@ import akka.actor.Actor import akka.event.Logging.Error import akka.event.Logging.{LoggerInitialized, InitializeLogger} import com.newrelic.api.agent.NewRelic -import NewRelic.noticeError +import kamon.trace.ContextAware class NewRelicErrorLogger extends Actor { def receive = { @@ -14,6 +14,13 @@ class NewRelicErrorLogger extends Actor { } def notifyError(error: Error): Unit = { - noticeError(error.cause) + val params = new java.util.HashMap[String, String]() + val ctx = error.asInstanceOf[ContextAware].traceContext + + for(c <- ctx) { + params.put("UOW", c.uow) + } + + NewRelic.noticeError(error.cause, params) } } |