# Exclude classes from excluded classes

**URL:** <https://discuss.elastic.co/t/exclude-classes-from-excluded-classes/272542>\
**Category:** APM\
**Tags:** java\
**Created:** [May 10, 2021, 7:20am UTC](https://discuss.elastic.co/t/exclude-classes-from-excluded-classes/272542 "2021-05-10T07:20:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tstadler](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tstadler](https://discuss.elastic.co/u/tstadler)\
**Post date:** [May 10, 2021, 7:20am UTC](https://discuss.elastic.co/t/exclude-classes-from-excluded-classes/272542/1 "2021-05-10T07:20:01Z")

</div>

I would like to develop a plugin that instruments a class in `org.jboss.as.ejb3.remote`. However `classes_excluded_from_instrumentation_default` contains `(?-i)org.jboss.as.*`, so my instrumentation is ignored by default. Is it possible to exclude `org.jboss.as.ejb3.remote.*` (or a sigle class) from `classes_excluded_from_instrumentation_default`?

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [May 13, 2021, 12:58pm UTC](https://discuss.elastic.co/t/exclude-classes-from-excluded-classes/272542/2 "2021-05-13T12:58:11Z")

</div>

Hi and thanks for the question.  
The `classes_excluded_from_instrumentation_default` config option is marked as `internal`, so it is not documented, however it is still a config option that you can override with whatever value you want.  
I hope this helps.

---

<div class="post-metadata">

**Author:** ![tstadler](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tstadler](https://discuss.elastic.co/u/tstadler)\
**Post date:** [May 16, 2021, 11:29am UTC](https://discuss.elastic.co/t/exclude-classes-from-excluded-classes/272542/3 "2021-05-16T11:29:16Z")

</div>

Thank you, But I was hopping for a solution that doesn‘t involve changing the parameter.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 6, 2021, 7:29am UTC](https://discuss.elastic.co/t/exclude-classes-from-excluded-classes/272542/4 "2021-06-06T07:29:58Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
