diff options
Diffstat (limited to 'kamon-newrelic/src/main')
-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) } } |