Interface OtlpConfig

All Superinterfaces:
io.micrometer.core.instrument.config.MeterRegistryConfig, io.micrometer.core.instrument.push.PushRegistryConfig

public interface OtlpConfig extends io.micrometer.core.instrument.push.PushRegistryConfig
Config for OtlpMeterRegistry.
Since:
1.9.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final OtlpConfig
    Configuration with default values.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
     
    default Map<String,String>
    Attributes to set on the Resource that will be used for all metrics published.
    default String
    url()
    Defaults to http://localhost:4318/v1/metrics
    default io.micrometer.core.instrument.config.validate.Validated<?>
     

    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

      static final OtlpConfig DEFAULT
      Configuration with default values.
  • Method Details

    • prefix

      default String prefix()
      Specified by:
      prefix in interface io.micrometer.core.instrument.config.MeterRegistryConfig
    • url

      default String url()
      Defaults to http://localhost:4318/v1/metrics
      Returns:
      address to where metrics will be published.
    • resourceAttributes

      default Map<String,String> resourceAttributes()
      Attributes to set on the Resource that will be used for all metrics published. This should include a service.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 format key1=value1,key2=value2. Resource attributes will be loaded from the OTEL_RESOURCE_ATTRIBUTES environment variable and the service name from the OTEL_SERVICE_NAME environment variable if they are set and MeterRegistryConfig.get(String) does not return a value.

      Returns:
      map of key value pairs to use as resource attributes
      See Also:
    • validate

      default io.micrometer.core.instrument.config.validate.Validated<?> validate()
      Specified by:
      validate in interface io.micrometer.core.instrument.config.MeterRegistryConfig
      Specified by:
      validate in interface io.micrometer.core.instrument.push.PushRegistryConfig