diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-15 10:26:58 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-15 10:26:58 +0100 |
commit | 0688c1a84caba17a600c498b158013f9867e4093 (patch) | |
tree | ad27f9490fb9f633083f99ddd0c02f6e297b4f32 /kamon-core/src/main | |
parent | eee33621d5ba27229d3039f3054c306d7e569985 (diff) | |
download | Kamon-0688c1a84caba17a600c498b158013f9867e4093.tar.gz Kamon-0688c1a84caba17a600c498b158013f9867e4093.tar.bz2 Kamon-0688c1a84caba17a600c498b158013f9867e4093.zip |
= core: rename UserMetrics to SimpleMetrics.
Diffstat (limited to 'kamon-core/src/main')
-rw-r--r-- | kamon-core/src/main/scala/kamon/Kamon.scala | 8 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/metric/SimpleMetrics.scala (renamed from kamon-core/src/main/scala/kamon/metric/UserMetrics.scala) | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/kamon-core/src/main/scala/kamon/Kamon.scala b/kamon-core/src/main/scala/kamon/Kamon.scala index 231fc530..cf492125 100644 --- a/kamon-core/src/main/scala/kamon/Kamon.scala +++ b/kamon-core/src/main/scala/kamon/Kamon.scala @@ -26,7 +26,7 @@ object Kamon { private case class KamonCoreComponents( metrics: MetricsExtension, tracer: TracerExtension, - userMetrics: UserMetricsExtension) + simpleMetrics: SimpleMetricsExtension) @volatile private var _system: ActorSystem = _ @volatile private var _coreComponents: Option[KamonCoreComponents] = None @@ -43,7 +43,7 @@ object Kamon { if (_coreComponents.isEmpty) { val metrics = MetricsExtensionImpl(config) - val simpleMetrics = UserMetricsExtensionImpl(metrics) + val simpleMetrics = SimpleMetricsExtensionImpl(metrics) val tracer = TracerExtensionImpl(metrics, config) _coreComponents = Some(KamonCoreComponents(metrics, tracer, simpleMetrics)) @@ -70,8 +70,8 @@ object Kamon { def tracer: TracerExtension = ifStarted(_.tracer) - def userMetrics: UserMetricsExtension = - ifStarted(_.userMetrics) + def simpleMetrics: SimpleMetricsExtension = + ifStarted(_.simpleMetrics) def apply[T <: Kamon.Extension](key: ExtensionId[T]): T = ifStarted { _ ⇒ diff --git a/kamon-core/src/main/scala/kamon/metric/UserMetrics.scala b/kamon-core/src/main/scala/kamon/metric/SimpleMetrics.scala index e0818292..b8dc54df 100644 --- a/kamon-core/src/main/scala/kamon/metric/UserMetrics.scala +++ b/kamon-core/src/main/scala/kamon/metric/SimpleMetrics.scala @@ -22,7 +22,7 @@ import kamon.metric.instrument._ import scala.concurrent.duration.FiniteDuration -trait UserMetricsExtension { +trait SimpleMetricsExtension { def histogram(name: String): Histogram def histogram(name: String, dynamicRange: DynamicRange): Histogram def histogram(name: String, unitOfMeasurement: UnitOfMeasurement): Histogram @@ -69,7 +69,7 @@ trait UserMetricsExtension { } -private[kamon] class UserMetricsExtensionImpl(instrumentFactory: InstrumentFactory) extends GenericEntityRecorder(instrumentFactory) with UserMetricsExtension { +private[kamon] class SimpleMetricsExtensionImpl(instrumentFactory: InstrumentFactory) extends GenericEntityRecorder(instrumentFactory) with SimpleMetricsExtension { override def histogram(name: String): Histogram = super.histogram(name) @@ -191,14 +191,14 @@ private[kamon] class UserMetricsExtensionImpl(instrumentFactory: InstrumentFacto super.removeCounter(key) } -private[kamon] object UserMetricsExtensionImpl { - val UserMetricEntity = Entity("user-metric", "user-metric") +private[kamon] object SimpleMetricsExtensionImpl { + val SimpleMetricsEntity = Entity("simple-metric", "simple-metric") - def apply(metricsExtension: MetricsExtension): UserMetricsExtensionImpl = { - val instrumentFactory = metricsExtension.instrumentFactory(UserMetricEntity.category) - val userMetricsExtension = new UserMetricsExtensionImpl(instrumentFactory) + def apply(metricsExtension: MetricsExtension): SimpleMetricsExtensionImpl = { + val instrumentFactory = metricsExtension.instrumentFactory(SimpleMetricsEntity.category) + val simpleMetricsExtension = new SimpleMetricsExtensionImpl(instrumentFactory) - metricsExtension.register(UserMetricEntity, userMetricsExtension).recorder + metricsExtension.register(SimpleMetricsEntity, simpleMetricsExtension).recorder } }
\ No newline at end of file |