Class DefaultNamer
- java.lang.Object
-
- com.lightbend.cinnamon.chmetrics.reporter.namer.DefaultNamer
-
- All Implemented Interfaces:
Namer
public class DefaultNamer extends java.lang.Object implements Namer
Default metric key naming starts with the descriptor category, then includes all visible and non-unique parts of the identity using pairs of identity category and name, and then adds the descriptor key.For example, using the default formatter, an actor will have the following metric key:
"metrics.akka.systems.<system>.dispatchers.<dispatcher>.actors.<actor>.<metric>"
-
-
Constructor Summary
Constructors Constructor Description DefaultNamer(Formatter formatter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
name(Identity identity, Descriptor descriptor)
Create the full metric key for a metric.java.lang.String
simpleName(Identity identity, Descriptor descriptor)
Create the simple name for a metric, without full hierarchy.java.lang.String
uniqueName(Identity identity, Descriptor descriptor)
Create the full metric key for a metric, including unique dimensions.
-
-
-
Constructor Detail
-
DefaultNamer
public DefaultNamer(Formatter formatter)
-
-
Method Detail
-
name
public java.lang.String name(Identity identity, Descriptor descriptor)
Description copied from interface:Namer
Create the full metric key for a metric.
-
simpleName
public java.lang.String simpleName(Identity identity, Descriptor descriptor)
Description copied from interface:Namer
Create the simple name for a metric, without full hierarchy.- Specified by:
simpleName
in interfaceNamer
- Parameters:
identity
- identity for the instrumented entitydescriptor
- descriptor for the metric- Returns:
- simple metric key for this identity and metric descriptor
-
uniqueName
public java.lang.String uniqueName(Identity identity, Descriptor descriptor)
Description copied from interface:Namer
Create the full metric key for a metric, including unique dimensions.- Specified by:
uniqueName
in interfaceNamer
- Parameters:
identity
- identity for the instrumented entitydescriptor
- descriptor for the metric- Returns:
- unique metric key for this identity and metric descriptor
-
-