aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/scala/kamon/metric/instrument/InstrumentSnapshot.scala
diff options
context:
space:
mode:
Diffstat (limited to 'kamon-core/src/main/scala/kamon/metric/instrument/InstrumentSnapshot.scala')
-rw-r--r--kamon-core/src/main/scala/kamon/metric/instrument/InstrumentSnapshot.scala11
1 files changed, 9 insertions, 2 deletions
diff --git a/kamon-core/src/main/scala/kamon/metric/instrument/InstrumentSnapshot.scala b/kamon-core/src/main/scala/kamon/metric/instrument/InstrumentSnapshot.scala
index ffb00080..1364c2d8 100644
--- a/kamon-core/src/main/scala/kamon/metric/instrument/InstrumentSnapshot.scala
+++ b/kamon-core/src/main/scala/kamon/metric/instrument/InstrumentSnapshot.scala
@@ -6,13 +6,14 @@ import kamon.util.MeasurementUnit
* Snapshot for instruments that internally track a single value. Meant to be used for counters and gauges.
*
*/
-case class SingleValueSnapshot(name: String, measurementUnit: MeasurementUnit, value: Long)
+case class SingleValueSnapshot(name: String, tags: Map[String, String], measurementUnit: MeasurementUnit, value: Long)
/**
* Snapshot for instruments that internally the distribution of values in a defined dynamic range. Meant to be used
* with histograms and min max counters.
*/
-case class DistributionSnapshot(name: String, measurementUnit: MeasurementUnit, dynamicRange: DynamicRange, distribution: Distribution)
+case class DistributionSnapshot(name: String, tags: Map[String, String], measurementUnit: MeasurementUnit,
+ dynamicRange: DynamicRange, distribution: Distribution)
trait Distribution {
@@ -48,3 +49,9 @@ trait DistributionSnapshotInstrument {
trait SingleValueSnapshotInstrument {
private[kamon] def snapshot(): SingleValueSnapshot
}
+
+trait SnapshotableHistogram extends Histogram with DistributionSnapshotInstrument
+trait SnapshotableMinMaxCounter extends MinMaxCounter with DistributionSnapshotInstrument
+trait SnapshotableCounter extends Counter with SingleValueSnapshotInstrument
+trait SnapshotableGauge extends Gauge with SingleValueSnapshotInstrument
+