Class AgentDistributionConfig
java.lang.Object
io.opentelemetry.javaagent.extension.instrumentation.internal.AgentDistributionConfig
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 Summary
Modifier and TypeMethodDescriptionstatic AgentDistributionConfigcreate()Creates a new instance for testing or fallback configuration scenarios.static AgentDistributionConfigfromConfigProperties(io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties configProperties) Creates a new instance from ConfigProperties.static AgentDistributionConfigget()booleanbooleanbooleanReturns whether instrumentations are enabled by default.booleanisInstrumentationEnabled(Iterable<String> names, boolean defaultEnabled) Returns whether any of the given instrumentations is enabled, falling back todefaultEnabledif none of the names are explicitly configured.booleanReturns whether the given instrumentation is enabled, falling back toisInstrumentationDefaultEnabled()if not explicitly configured.booleanisInstrumentationEnabled(String name, boolean defaultEnabled) Returns whether the given instrumentation is enabled, falling back todefaultEnabledif not explicitly configured.static voidstatic voidset(AgentDistributionConfig distributionConfig)
-
Method Details
-
get
-
resetForTest
public static void resetForTest() -
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
-
isInstrumentationDefaultEnabled
public boolean isInstrumentationDefaultEnabled()Returns whether instrumentations are enabled by default.- Returns:
trueif instrumentations are enabled by default,falseotherwise
-
isInstrumentationEnabled
Returns whether any of the given instrumentations is enabled, falling back todefaultEnabledif 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 checkdefaultEnabled- the default to use if no name is explicitly configured- Returns:
trueif the instrumentation is enabled,falseotherwise
-
isInstrumentationEnabled
Returns whether the given instrumentation is enabled, falling back todefaultEnabledif not explicitly configured. -
isInstrumentationEnabled
Returns whether the given instrumentation is enabled, falling back toisInstrumentationDefaultEnabled()if not explicitly configured. -
isIndyEnabled
public boolean isIndyEnabled() -
isForceSynchronousAgentListeners
public boolean isForceSynchronousAgentListeners() -
getExcludeClasses
-
getExcludeClassLoaders
-