Class TemporalitySettings
- java.lang.Object
-
- com.lightbend.cinnamon.opentelemetry.metrics.TemporalitySettings
-
public final class TemporalitySettings extends java.lang.Object
Configurable settings for aggregation temporality.
-
-
Constructor Summary
Constructors Constructor Description TemporalitySettings()
-
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 anAggregationTemporalitySelector
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).
-
-
-
Method Detail
-
aggregationTemporalitySelector
public static io.opentelemetry.sdk.metrics.export.AggregationTemporalitySelector aggregationTemporalitySelector(com.typesafe.config.Config config, java.lang.String selectorKey, Logger log)
Create anAggregationTemporalitySelector
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 settingsselectorKey
- the config key for the selector settinglog
- 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
- defaultAggregationTemporality
value if not known- Returns:
AggregationTemporality
value, or default if not a known name
-
-