diff options
author | Diego <diegolparra@gmail.com> | 2014-09-09 00:58:03 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2014-09-09 01:05:42 -0300 |
commit | 54e5f1c7bf9b4b04fd26822e4d1f53ef9f22251c (patch) | |
tree | 30e2f5595446e56d765a7ece7246b9b69054dd17 | |
parent | 0d7fa6333c7d6e865575522a0015c93ff3fbbe1b (diff) | |
download | Kamon-54e5f1c7bf9b4b04fd26822e4d1f53ef9f22251c.tar.gz Kamon-54e5f1c7bf9b4b04fd26822e4d1f53ef9f22251c.tar.bz2 Kamon-54e5f1c7bf9b4b04fd26822e4d1f53ef9f22251c.zip |
= play:
* remove from publishErrorMessage method
* refactor onError method in RequestInstrumentation
* refactor WSInstrumentation in order to propagate the TraceContext when a WS call is executed outside an Action
* improve tests
* closes #33
3 files changed, 13 insertions, 22 deletions
diff --git a/kamon-core/src/main/scala/kamon/Kamon.scala b/kamon-core/src/main/scala/kamon/Kamon.scala index 24bbb5f0..dfebd3a5 100644 --- a/kamon-core/src/main/scala/kamon/Kamon.scala +++ b/kamon-core/src/main/scala/kamon/Kamon.scala @@ -1,30 +1,23 @@ -/* =================================================== - * Copyright © 2013 the kamon project <http://kamon.io/> +/* ========================================================================================= + * Copyright © 2013-2014 the kamon project <http://kamon.io/> * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific language governing permissions + * and limitations under the License. + * ========================================================================================= + */ package kamon import akka.actor._ -import akka.event.Logging.Error object Kamon { - trait Extension extends akka.actor.Extension { - def publishErrorMessage(system: ActorSystem, msg: String, cause: Throwable): Unit = { - system.eventStream.publish(new Error(cause, "", classOf[Extension], msg)) - } - } - + trait Extension extends akka.actor.Extension def apply[T <: Extension](key: ExtensionId[T])(implicit system: ActorSystem): T = key(system) } diff --git a/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorCellInstrumentation.scala b/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorCellInstrumentation.scala index f6b68617..9b541a32 100644 --- a/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorCellInstrumentation.scala +++ b/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorCellInstrumentation.scala @@ -170,7 +170,7 @@ object ActorCellInstrumentation { implicit class PimpedActorCellMetrics(cell: ActorCellMetrics) { def onRoutedActorCell(block: ActorCellMetrics ⇒ Unit) = cell match { case routedActorCell: RoutedActorCell ⇒ block(cell) - case everyThingElse ⇒ + case everythingElse ⇒ } } }
\ No newline at end of file diff --git a/kamon-core/src/test/scala/kamon/metric/RouterMetricsSpec.scala b/kamon-core/src/test/scala/kamon/metric/RouterMetricsSpec.scala index 37b3d169..a012fba1 100644 --- a/kamon-core/src/test/scala/kamon/metric/RouterMetricsSpec.scala +++ b/kamon-core/src/test/scala/kamon/metric/RouterMetricsSpec.scala @@ -129,8 +129,6 @@ class RouterMetricsSpec extends TestKitBase with WordSpecLike with Matchers with } def createTestRouter(name: String): ActorRef = system.actorOf(RoundRobinPool(5).props(Props[RouterMetricsTestActor]), name) - - def takeSnapshotOf(amr: RouterMetricsRecorder): RouterMetricSnapshot = amr.collect(collectionContext) } } |