Class AgentDistributionConfig

java.lang.Object
io.opentelemetry.javaagent.extension.instrumentation.internal.AgentDistributionConfig

public class AgentDistributionConfig extends Object
Javaagent distribution-specific configuration.

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Method Details

    • get

      public static AgentDistributionConfig get()
    • resetForTest

      public static void resetForTest()
    • create

      public static AgentDistributionConfig create()
      Creates a new instance for testing or fallback configuration scenarios.

      This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

    • fromConfigProperties

      public static AgentDistributionConfig fromConfigProperties(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties configProperties)
      Creates a new instance from ConfigProperties.

      This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

    • set

      public static void set(AgentDistributionConfig distributionConfig)
    • isInstrumentationDefaultEnabled

      public boolean isInstrumentationDefaultEnabled()
      Returns whether instrumentations are enabled by default.
      Returns:
      true if instrumentations are enabled by default, false otherwise
    • isInstrumentationEnabled

      public boolean isInstrumentationEnabled(Iterable<String> names, boolean defaultEnabled)
      Returns whether any of the given instrumentations is enabled, falling back to defaultEnabled if none of the names are explicitly configured.

      Names are checked in order; the first name found in either the disabled or enabled list wins. For any given name, disabled takes priority over enabled.

      Parameters:
      names - the instrumentation names to check
      defaultEnabled - the default to use if no name is explicitly configured
      Returns:
      true if the instrumentation is enabled, false otherwise
    • isInstrumentationEnabled

      public boolean isInstrumentationEnabled(String name, boolean defaultEnabled)
      Returns whether the given instrumentation is enabled, falling back to defaultEnabled if not explicitly configured.
    • isInstrumentationEnabled

      public boolean isInstrumentationEnabled(String name)
      Returns whether the given instrumentation is enabled, falling back to isInstrumentationDefaultEnabled() if not explicitly configured.
    • isIndyEnabled

      public boolean isIndyEnabled()
    • isForceSynchronousAgentListeners

      public boolean isForceSynchronousAgentListeners()
    • getExcludeClasses

      public List<String> getExcludeClasses()
    • getExcludeClassLoaders

      public List<String> getExcludeClassLoaders()