Class 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>"
     
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.
        Specified by:
        name in interface Namer
        Parameters:
        identity - identity for the instrumented entity
        descriptor - descriptor for the metric
        Returns:
        full metric key for this identity and metric descriptor
      • 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 interface Namer
        Parameters:
        identity - identity for the instrumented entity
        descriptor - 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 interface Namer
        Parameters:
        identity - identity for the instrumented entity
        descriptor - descriptor for the metric
        Returns:
        unique metric key for this identity and metric descriptor