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.headers()Additional headers to send with exported metrics.default Stringprefix()Attributes to set on the Resource that will be used for all metrics published.default Stringurl()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, requireValidMethods 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:
prefixin 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.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).- Returns:
- the aggregationTemporality for OtlpRegistry
- 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:
-
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
-