diff options
author | Diego <diegolparra@gmail.com> | 2014-03-09 15:01:51 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2014-03-09 15:01:51 -0300 |
commit | 60f8dd3be4593cb55e5c4023b7041ad94f6b8c8a (patch) | |
tree | 1ebb66d4edb9ff1fcc622e3a559b7cbb813c7326 | |
parent | eb7c41c17ced2a749fe2c63794531f067d76ea7b (diff) | |
download | Kamon-60f8dd3be4593cb55e5c4023b7041ad94f6b8c8a.tar.gz Kamon-60f8dd3be4593cb55e5c4023b7041ad94f6b8c8a.tar.bz2 Kamon-60f8dd3be4593cb55e5c4023b7041ad94f6b8c8a.zip |
Play Integration with: X-Trace-Token, WebExternal Time and Error publishing in Akka EventStream
-rw-r--r-- | kamon-core/src/main/scala/kamon/Kamon.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kamon-core/src/main/scala/kamon/Kamon.scala b/kamon-core/src/main/scala/kamon/Kamon.scala index eb0b56ef..44e895bd 100644 --- a/kamon-core/src/main/scala/kamon/Kamon.scala +++ b/kamon-core/src/main/scala/kamon/Kamon.scala @@ -16,13 +16,16 @@ package kamon import akka.actor._ -import akka.event.Logging.Info +import akka.event.Logging.{ Info, Error } object Kamon { trait Extension extends akka.actor.Extension { def publishInfoMessage(system: ActorSystem, msg: String): Unit = { system.eventStream.publish(Info("", classOf[Extension], msg)) } + def publishErrorMessage(system: ActorSystem, msg: String, cause: Throwable): Unit = { + system.eventStream.publish(new Error(cause, "", classOf[Extension], msg)) + } } def apply[T <: Extension](key: ExtensionId[T])(implicit system: ActorSystem): T = key(system) |