Class ConfigBuilder

java.lang.Object
io.opentelemetry.instrumentation.api.config.ConfigBuilder

public final class ConfigBuilder extends Object
A builder of a Config.
  • Constructor Details

  • Method Details

    • addProperty

      public ConfigBuilder addProperty(String name, String value)
      Adds a single property named to the config.
    • readProperties

      @Deprecated public ConfigBuilder readProperties(Properties properties)
      Deprecated.
      Adds all properties from the passed properties to the config.
    • readProperties

      @Deprecated public ConfigBuilder readProperties(Map<String,String> properties)
      Deprecated.
      Use addProperties(Map) instead.
      Adds all properties from the passed properties to the config.
    • addProperties

      public ConfigBuilder addProperties(Properties properties)
      Adds all properties from the passed properties to the config.
    • addProperties

      public ConfigBuilder addProperties(Map<String,String> properties)
      Adds all properties from the passed properties to the config.
    • readEnvironmentVariables

      @Deprecated public ConfigBuilder readEnvironmentVariables()
      Deprecated.
      Adds environment variables, converted to Java property naming convention, to the config.

      Environment variable names are lowercased, and the underscores are replaced by dots.

    • addEnvironmentVariables

      public ConfigBuilder addEnvironmentVariables()
      Adds environment variables, converted to Java property naming convention, to the config.

      Environment variable names are lowercased, and the underscores are replaced by dots.

    • readSystemProperties

      @Deprecated public ConfigBuilder readSystemProperties()
      Deprecated.
      Adds system properties to the config.
    • addSystemProperties

      public ConfigBuilder addSystemProperties()
      Adds system properties to the config.
    • build

      public Config build()
      Returns a new Config with properties from this builder.