aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon/metric
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2017-06-06 15:58:42 +0200
committerIvan Topolnjak <ivantopo@gmail.com>2017-06-06 15:58:42 +0200
commit0d29461f25851b0ea61dfbcd7784df49c08f840f (patch)
tree7de9926b3297cff1875695546b2caf5fa87d477d /kamon-core/src/main/scala/kamon/metric
parent2df5d7186354fb8fd815d3b73ea8d16d400e879f (diff)
downloadKamon-0d29461f25851b0ea61dfbcd7784df49c08f840f.tar.gz
Kamon-0d29461f25851b0ea61dfbcd7784df49c08f840f.tar.bz2
Kamon-0d29461f25851b0ea61dfbcd7784df49c08f840f.zip
rename metric types nested object
Diffstat (limited to 'kamon-core/src/main/scala/kamon/metric')
-rw-r--r--kamon-core/src/main/scala/kamon/metric/MetricRegistry.scala18
1 files changed, 9 insertions, 9 deletions
diff --git a/kamon-core/src/main/scala/kamon/metric/MetricRegistry.scala b/kamon-core/src/main/scala/kamon/metric/MetricRegistry.scala
index de64bc17..475ffc4d 100644
--- a/kamon-core/src/main/scala/kamon/metric/MetricRegistry.scala
+++ b/kamon-core/src/main/scala/kamon/metric/MetricRegistry.scala
@@ -22,16 +22,16 @@ class MetricRegistry(initialConfig: Config) extends MetricsSnapshotGenerator {
}
def histogram(name: String, unit: MeasurementUnit, tags: Map[String, String], dynamicRange: Option[DynamicRange]): Histogram =
- lookupInstrument(name, unit, tags, InstrumentType.Histogram, instrumentFactory.get().buildHistogram(dynamicRange))
+ lookupInstrument(name, unit, tags, InstrumentTypes.Histogram, instrumentFactory.get().buildHistogram(dynamicRange))
def counter(name: String, unit: MeasurementUnit, tags: Map[String, String]): Counter =
- lookupInstrument(name, unit, tags, InstrumentType.Counter, instrumentFactory.get().buildCounter)
+ lookupInstrument(name, unit, tags, InstrumentTypes.Counter, instrumentFactory.get().buildCounter)
def gauge(name: String, unit: MeasurementUnit, tags: Map[String, String]): Gauge =
- lookupInstrument(name, unit, tags, InstrumentType.Gauge, instrumentFactory.get().buildGauge)
+ lookupInstrument(name, unit, tags, InstrumentTypes.Gauge, instrumentFactory.get().buildGauge)
def minMaxCounter(name: String, unit: MeasurementUnit, tags: Map[String, String], dynamicRange: Option[DynamicRange], sampleInterval: Option[Duration]): MinMaxCounter =
- lookupInstrument(name, unit, tags, InstrumentType.MinMaxCounter, instrumentFactory.get().buildMinMaxCounter(dynamicRange, sampleInterval))
+ lookupInstrument(name, unit, tags, InstrumentTypes.MinMaxCounter, instrumentFactory.get().buildMinMaxCounter(dynamicRange, sampleInterval))
override def snapshot(): MetricsSnapshot = synchronized {
@@ -45,10 +45,10 @@ class MetricRegistry(initialConfig: Config) extends MetricsSnapshotGenerator {
instrument <- metricEntry.instruments.values
} {
metricEntry.instrumentType match {
- case InstrumentType.Histogram => histograms = histograms :+ instrument.asInstanceOf[SnapshotableHistogram].snapshot()
- case InstrumentType.MinMaxCounter => mmCounters = mmCounters :+ instrument.asInstanceOf[SnapshotableMinMaxCounter].snapshot()
- case InstrumentType.Gauge => gauges = gauges :+ instrument.asInstanceOf[SnapshotableGauge].snapshot()
- case InstrumentType.Counter => counters = counters :+ instrument.asInstanceOf[SnapshotableCounter].snapshot()
+ case InstrumentTypes.Histogram => histograms = histograms :+ instrument.asInstanceOf[SnapshotableHistogram].snapshot()
+ case InstrumentTypes.MinMaxCounter => mmCounters = mmCounters :+ instrument.asInstanceOf[SnapshotableMinMaxCounter].snapshot()
+ case InstrumentTypes.Gauge => gauges = gauges :+ instrument.asInstanceOf[SnapshotableGauge].snapshot()
+ case InstrumentTypes.Counter => counters = counters :+ instrument.asInstanceOf[SnapshotableCounter].snapshot()
case other => logger.warn("Unexpected instrument type [{}] found in the registry", other )
}
}
@@ -71,7 +71,7 @@ class MetricRegistry(initialConfig: Config) extends MetricsSnapshotGenerator {
}
private case class InstrumentType(name: String)
- private object InstrumentType {
+ private object InstrumentTypes {
val Histogram = InstrumentType("Histogram")
val MinMaxCounter = InstrumentType("MinMaxCounter")
val Counter = InstrumentType("Counter")