# Does Java APM sample rate affect exceptions?

**URL:** <https://discuss.elastic.co/t/does-java-apm-sample-rate-affect-exceptions/239695>\
**Category:** APM\
**Tags:** java\
**Created:** [July 2, 2020, 6:18pm UTC](https://discuss.elastic.co/t/does-java-apm-sample-rate-affect-exceptions/239695 "2020-07-02T18:18:29Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [July 8, 2020, 7:38am UTC](https://discuss.elastic.co/t/does-java-apm-sample-rate-affect-exceptions/239695/4 "2020-07-08T07:38:59Z")

</div>

Yes, that's exactly what happens with Spring `@ExceptionHandler`, and we suggest to apply the same approach ([APM dont capture exception from @ExceptionHandler](https://discuss.elastic.co/t/apm-dont-capture-exception-from-exceptionhandler/187530)).

---

_[View the full topic](https://discuss.elastic.co/t/does-java-apm-sample-rate-affect-exceptions/239695)._
