Interface OtlpConfig
- All Superinterfaces:
io.micrometer.core.instrument.config.MeterRegistryConfig,io.micrometer.core.instrument.push.PushRegistryConfig
OtlpMeterRegistry.- Since:
- 1.9.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault AggregationTemporalityAggregationTemporalityof the OtlpMeterRegistry.default TimeUnitheaders()Additional headers to send with exported metrics.default HistogramFlavorHistogram type to be preferred when histogram publishing is enabled.default intMaximum number of buckets to be used for exponential histograms, if configured.default intmaxScale()Max scale to use for exponential histograms, if configured.default Stringprefix()Attributes to set on the Resource that will be used for all metrics published.default Durationstep()Default implementation supports the environment variableOTEL_METRIC_EXPORT_INTERVALwhen the step value is not provided by theMeterRegistryConfig.get(String)implementation.default Stringurl()If no value is returned byMeterRegistryConfig.get(String), environment variablesOTEL_EXPORTER_OTLP_METRICS_ENDPOINTandOTEL_EXPORTER_OTLP_ENDPOINTenvironment variables will be checked, in that order, by the default implementation.default io.micrometer.core.instrument.config.validate.Validated<?> validate()Methods inherited from interface io.micrometer.core.instrument.config.MeterRegistryConfig
get, requireValidMethods inherited from interface io.micrometer.core.instrument.push.PushRegistryConfig
batchSize, connectTimeout, enabled, numThreads, readTimeout
-
Field Details
-
DEFAULT
Configuration with default values.
-
-
Method Details
-
prefix
- Specified by:
prefixin interfaceio.micrometer.core.instrument.config.MeterRegistryConfig
-
url
If no value is returned byMeterRegistryConfig.get(String), environment variablesOTEL_EXPORTER_OTLP_METRICS_ENDPOINTandOTEL_EXPORTER_OTLP_ENDPOINTenvironment variables will be checked, in that order, by the default implementation.- Returns:
- address to where metrics will be published. Default is
http://localhost:4318/v1/metrics - See Also:
-
step
Default implementation supports the environment variableOTEL_METRIC_EXPORT_INTERVALwhen the step value is not provided by theMeterRegistryConfig.get(String)implementation.- Specified by:
stepin interfaceio.micrometer.core.instrument.push.PushRegistryConfig- Returns:
- step size (reporting frequency) to use. The default is 1 minute.
- See Also:
-
resourceAttributes
Attributes to set on the Resource that will be used for all metrics published. This should include aservice.nameattribute that identifies your service.By default, resource attributes will load using the
MeterRegistryConfig.get(String)method, extracting key values from a comma-separated list in the formatkey1=value1,key2=value2. Resource attributes will be loaded from theOTEL_RESOURCE_ATTRIBUTESenvironment variable and the service name from theOTEL_SERVICE_NAMEenvironment variable if they are set andMeterRegistryConfig.get(String)does not return a value.- Returns:
- map of key value pairs to use as resource attributes
- See Also:
-
aggregationTemporality
AggregationTemporalityof the OtlpMeterRegistry. This determines whether the meters should be cumulative(AGGREGATION_TEMPORALITY_CUMULATIVE) or step/delta(AGGREGATION_TEMPORALITY_DELTA). Default implementation supports the environment variableOTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCEwhen a value is not provided byMeterRegistryConfig.get(String).- Returns:
- the aggregationTemporality; default is Cumulative
- Since:
- 1.11.0
- See Also:
-
headers
Additional headers to send with exported metrics. This may be needed for authorization headers, for example.By default, headers will be loaded from
MeterRegistryConfig.get(String). If that is not set, they will be taken from the environment variablesOTEL_EXPORTER_OTLP_HEADERSandOTEL_EXPORTER_OTLP_METRICS_HEADERS. The header key-value pairs are expected to be in a comma-separated list in the formatkey1=value1,key2=value2. If a header is set in bothOTEL_EXPORTER_OTLP_HEADERSandOTEL_EXPORTER_OTLP_METRICS_HEADERS, the header in the latter will overwrite the former.- Returns:
- a map of the headers' key-value pairs
- Since:
- 1.11.0
- See Also:
-
histogramFlavor
Histogram type to be preferred when histogram publishing is enabled. By defaultHistogramFlavor.EXPLICIT_BUCKET_HISTOGRAMis used for the supported meters. When this is set toHistogramFlavor.BASE2_EXPONENTIAL_BUCKET_HISTOGRAMandpublishPercentileHistogramis enabledBase2ExponentialHistogramis used for recording distributions.Note: If specific SLO's are configured, this property is not honored and
HistogramFlavor.EXPLICIT_BUCKET_HISTOGRAMis used for those meters.- Returns:
- - histogram flavor to be used
- Since:
- 1.14.0
-
maxScale
default int maxScale()Max scale to use for exponential histograms, if configured.- Returns:
- maxScale
- Since:
- 1.14.0
- See Also:
-
maxBucketCount
default int maxBucketCount()Maximum number of buckets to be used for exponential histograms, if configured. This has no effect on explicit bucket histograms.- Returns:
- - maxBuckets
- Since:
- 1.14.0
- See Also:
-
validate
default io.micrometer.core.instrument.config.validate.Validated<?> validate()- Specified by:
validatein interfaceio.micrometer.core.instrument.config.MeterRegistryConfig- Specified by:
validatein interfaceio.micrometer.core.instrument.push.PushRegistryConfig
-
baseTimeUnit
-