# Java APM Agent Questions

**URL:** <https://discuss.elastic.co/t/java-apm-agent-questions/130328>\
**Category:** APM\
**Created:** [May 2, 2018, 10:03pm UTC](https://discuss.elastic.co/t/java-apm-agent-questions/130328 "2018-05-02T22:03:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ritchierich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ritchierich/32/4329_2.png) [@ritchierich](https://discuss.elastic.co/u/ritchierich)\
**Post date:** [May 2, 2018, 10:03pm UTC](https://discuss.elastic.co/t/java-apm-agent-questions/130328/1 "2018-05-02T22:03:31Z")

</div>

A few question to get a better understanding of the Java APM Agent.

Would APM capture JMV errors?  
Would it capture the stack variables state?  
Would it capture any exception or just not treated exceptions?

Cheers,  
Rich

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [May 7, 2018, 1:20pm UTC](https://discuss.elastic.co/t/java-apm-agent-questions/130328/2 "2018-05-07T13:20:00Z")

</div>

Hi Rich,

thanks for checking out the alpha Java APM agent and sorry for the delay in responding to this.

Currently, the agent captures `Exception`s in a `javax.servlet.Filter`, which means it captures unhandled exceptions in servlet-based applications. Going forward, when supporting more frameworks, it just depends on how these frameworks handle and report errors. Also note that there is a public API you can use to track custom errors.

The error tracking does not capture variables.

But most importantly, how would you like the error tracking to work? What are your use cases?

Felix

---

<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:** [May 28, 2018, 9:20am UTC](https://discuss.elastic.co/t/java-apm-agent-questions/130328/3 "2018-05-28T09:20:08Z")

</div>

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