Interface ConfigProvider
@ThreadSafe
public interface ConfigProvider
A registry for accessing declarative configuration.
The name Provider is for consistency with other languages and it is NOT loaded using reflection.
See InstrumentationConfigUtil for convenience methods for extracting config from
ConfigProvider.
-
Method Summary
Modifier and TypeMethodDescriptiondefault DeclarativeConfigPropertiesReturns theDeclarativeConfigPropertiesfor general instrumentation configuration.Returns theDeclarativeConfigPropertiescorresponding to instrumentation config, orDeclarativeConfigProperties.empty()if unavailable.default DeclarativeConfigPropertiesReturns theDeclarativeConfigPropertiesfor a specific instrumentation by name.static ConfigProvidernoop()Returns a no-opConfigProvider.
-
Method Details
-
getInstrumentationConfig
DeclarativeConfigProperties getInstrumentationConfig()Returns theDeclarativeConfigPropertiescorresponding to instrumentation config, orDeclarativeConfigProperties.empty()if unavailable.- Returns:
- the instrumentation
DeclarativeConfigProperties
-
getInstrumentationConfig
Returns theDeclarativeConfigPropertiesfor a specific instrumentation by name. If no configuration is available for the given name, an emptyDeclarativeConfigPropertiesis returned.For example,
getInstrumentationConfig("foo")returns the node:instrumentation/development: java: foo:- Parameters:
name- the name of the instrumentation- Returns:
- the
DeclarativeConfigPropertiesfor the given instrumentation name
-
getGeneralInstrumentationConfig
Returns theDeclarativeConfigPropertiesfor general instrumentation configuration.instrumentation/development: general:If the general configuration is not available, an empty
DeclarativeConfigPropertiesis returned.- Returns:
- the
DeclarativeConfigPropertiesfor the general instrumentation configuration
-
noop
Returns a no-opConfigProvider.
-