elastic / elastic/apm-agent-java
Allow plugins to override global excludes
- Dominant language
- Java
- Stars
- 594
- Forks
- 338
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 25
Description
Currently, the agent have a global static list of classes that are excluded from instrumentation.
This list is maintained in `co.elastic.apm.agent.bci.ElasticApmAgent#getAgentBuilder` method.
Also, there is the internal `classes_excluded_from_instrumentation_default` configuration that plugins can't modify.
While simple and effective, this implementation has the following disadvantages:
- for internal plugins: adding support for a class that is currently ignored will require to change this exclusion.
Example : #903 :
- for external plugins: there is no way to bypass the exclusion, hence preventing instrumentation of some classes
Example : https://github.com/elastic/apm-agent-java/issues/1919
Contributor guide
Assessment
This issue has not been assessed yet.