# Capturing Exception StackTraces

**URL:** <https://community.dynatrace.com/t/capturing-exception-stacktraces/33623>\
**Category:** Open Q&A\
**Tags:** integrations, technologies\
**Created:** [December 22, 2021, 6:49am UTC](https://community.dynatrace.com/t/capturing-exception-stacktraces/33623 "2021-12-22T06:49:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pankajchugh](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@pankajchugh](https://community.dynatrace.com/u/pankajchugh)\
**Post date:** [December 22, 2021, 6:49am UTC](https://community.dynatrace.com/t/capturing-exception-stacktraces/33623/1 "2021-12-22T06:49:09Z")

</div>

We have explicitly avoid capturing stacktrace in our Exception class using below -

```auto
@Override
public synchronized Throwable fillInStackTrace() {
    return this;
}

```

But still Dynatrace capture the entire stacktrace whereas we think it should not and show only the message rather than full stack trace.

Can anyone provide more insight on that?

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [March 30, 2022, 3:53pm UTC](https://community.dynatrace.com/t/capturing-exception-stacktraces/33623/2 "2022-03-30T15:53:21Z")

</div>

I would ensure your exception is set up as outlined in this doc and is valid.&nbsp;[Configure service failure detection in Service Detection v1 — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/service-error-detection#ignore-exceptions)&nbsp;If it is still capturing after that, then a support ticket would be you best option to get this sorted as this is not intended functionality.

---

<div class="post-metadata">

**Author:** ![harald\_berger](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/harald_berger/32/31754_2.png) [@harald\_berger](https://community.dynatrace.com/u/harald_berger)\
**Post date:** [April 1, 2022, 4:35am UTC](https://community.dynatrace.com/t/capturing-exception-stacktraces/33623/3 "2022-04-01T04:35:50Z")

</div>

Hi,

The OneAgent is getting the stacktrace via the JVM tool interface. Therefore you cannot override it with custom Java code. See also:&nbsp;&nbsp;[JVM(TM) Tool Interface 1.2.3](https://docs.oracle.com/javase/8/docs/platform/jvmti/jvmti.html#GetStackTrace)

regards

Harry
