The Spring Bean plugin is responsible for instrumenting Spring Beans in a Spring Boot application. All beans will be instrumented by default. This might bring in some performance penalties during the application startup.
It provides some configurations to control the instrumentation.
Again, you can use any of the methods mentioned in the agent configuration doc to control these configurations. In this doc, we use the JVM system property to change configurations as examples.
You can disable this plugin by setting the enabled
configuration to false
.
-Dbithon.agent.plugin.spring.bean.enabled=false
If you only want to instrument beans that are annotated with Spring @Service
,
@Component
, @Repository
, you can use the following configuration.
-Dbithon.agent.plugin.spring.bean.enableServiceComponentOnly=true
You can exclude specific beans from being instrumented by providing a list of bean names.
Please see the YAML configurations under this plugin for reference.