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 AggregationTemporality
AggregationTemporality
of the OtlpMeterRegistry.default TimeUnit
headers()
Additional headers to send with exported metrics.default String
prefix()
Attributes to set on the Resource that will be used for all metrics published.default String
url()
Defaults to http://localhost:4318/v1/metricsdefault io.micrometer.core.instrument.config.validate.Validated
<?> validate()
Methods inherited from interface io.micrometer.core.instrument.config.MeterRegistryConfig
get, requireValid
Methods inherited from interface io.micrometer.core.instrument.push.PushRegistryConfig
batchSize, connectTimeout, enabled, numThreads, readTimeout, step
-
Field Details
-
DEFAULT
Configuration with default values.
-
-
Method Details
-
prefix
- Specified by:
prefix
in interfaceio.micrometer.core.instrument.config.MeterRegistryConfig
-
url
Defaults to http://localhost:4318/v1/metrics- Returns:
- address to where metrics will be published.
-
resourceAttributes
Attributes to set on the Resource that will be used for all metrics published. This should include aservice.name
attribute 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_ATTRIBUTES
environment variable and the service name from theOTEL_SERVICE_NAME
environment 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
AggregationTemporality
of the OtlpMeterRegistry. This determines whether the meters should be cumulative(AGGREGATION_TEMPORALITY_CUMULATIVE) or step/delta(AGGREGATION_TEMPORALITY_DELTA).- Returns:
- the aggregationTemporality for OtlpMeterRegistry
- 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_HEADERS
andOTEL_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_HEADERS
andOTEL_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:
-
validate
default io.micrometer.core.instrument.config.validate.Validated<?> validate()- Specified by:
validate
in interfaceio.micrometer.core.instrument.config.MeterRegistryConfig
- Specified by:
validate
in interfaceio.micrometer.core.instrument.push.PushRegistryConfig
-
baseTimeUnit
-