Class TemporalitySettings


  • public final class TemporalitySettings
    extends java.lang.Object
    Configurable settings for aggregation temporality.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static io.opentelemetry.sdk.metrics.data.AggregationTemporality aggregationTemporality​(java.lang.String name)
      AggregationTemporality value for name (case-insensitive).
      static io.opentelemetry.sdk.metrics.data.AggregationTemporality aggregationTemporality​(java.lang.String name, io.opentelemetry.sdk.metrics.data.AggregationTemporality defaultTemporality)
      AggregationTemporality value for name (case-insensitive).
      static io.opentelemetry.sdk.metrics.export.AggregationTemporalitySelector aggregationTemporalitySelector​(com.typesafe.config.Config config, java.lang.String selectorKey, Logger log)
      Create an AggregationTemporalitySelector from config and a selector key.
      static io.opentelemetry.sdk.metrics.InstrumentType instrumentType​(java.lang.String name)
      InstrumentType value for name (case-insensitive, with hyphens or underscores).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TemporalitySettings

        public TemporalitySettings()
    • Method Detail

      • aggregationTemporalitySelector

        public static io.opentelemetry.sdk.metrics.export.AggregationTemporalitySelector aggregationTemporalitySelector​(com.typesafe.config.Config config,
                                                                                                                        java.lang.String selectorKey,
                                                                                                                        Logger log)
        Create an AggregationTemporalitySelector from config and a selector key.

        Selector value can be a pre-defined selector — "always-cumulative" or "delta-preferred" — or a custom selector defined with config.

        Config object should have the following format:

        
         {
           selector-key = always-cumulative | delta-preferred | some-custom-selector
        
           # custom selector section can be named appropriately
           some-custom-selector {
             # specify the default, or otherwise defaults to cumulative
             default = delta
        
             # select aggregation temporality for particular instrument types
             select {
               up-down-counter = cumulative
               observable-up-down-counter = cumulative
             }
           }
         }
         
        Parameters:
        config - the Config object that contains the selector settings
        selectorKey - the config key for the selector setting
        log - the Cinnamon Logger
        Returns:
        AggregationTemporalitySelector for the configured selector
      • instrumentType

        public static io.opentelemetry.sdk.metrics.InstrumentType instrumentType​(java.lang.String name)
        InstrumentType value for name (case-insensitive, with hyphens or underscores).
        Parameters:
        name - InstrumentType name
        Returns:
        InstrumentType value, or null if not a known name
      • aggregationTemporality

        public static io.opentelemetry.sdk.metrics.data.AggregationTemporality aggregationTemporality​(java.lang.String name)
        AggregationTemporality value for name (case-insensitive).
        Parameters:
        name - AggregationTemporality name: "cumulative" or "delta"
        Returns:
        AggregationTemporality value, or default to CUMULATIVE
      • aggregationTemporality

        public static io.opentelemetry.sdk.metrics.data.AggregationTemporality aggregationTemporality​(java.lang.String name,
                                                                                                      io.opentelemetry.sdk.metrics.data.AggregationTemporality defaultTemporality)
        AggregationTemporality value for name (case-insensitive).
        Parameters:
        name - AggregationTemporality name: "cumulative" or "delta"
        defaultTemporality - default AggregationTemporality value if not known
        Returns:
        AggregationTemporality value, or default if not a known name