# APM.captureError: Pass in stacktrace when using parameterized message objects

**URL:** <https://discuss.elastic.co/t/apm-captureerror-pass-in-stacktrace-when-using-parameterized-message-objects/219589>\
**Category:** APM\
**Tags:** nodejs, server\
**Created:** [February 17, 2020, 9:59am UTC](https://discuss.elastic.co/t/apm-captureerror-pass-in-stacktrace-when-using-parameterized-message-objects/219589 "2020-02-17T09:59:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Petrie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matthew_petrie/32/59145_2.png) [@Matthew\_Petrie](https://discuss.elastic.co/u/Matthew_Petrie)\
**Post date:** [February 17, 2020, 9:59am UTC](https://discuss.elastic.co/t/apm-captureerror-pass-in-stacktrace-when-using-parameterized-message-objects/219589/1 "2020-02-17T09:59:03Z")

</div>

**Kibana version** : 7.6  
**Elasticsearch version** : 7.6  
**APM Server version** : 7.6  
**APM Agent language and version** : Node.JS 3.3.0  
**Original install method** : Elastic Cloud

We were advised to use Parameterised Message Objects when reporting errors due to quite a few errors having the same stacktrace ([Incorrect Error Grouping](https://discuss.elastic.co/t/incorrect-error-grouping/215939)). When using Parameterised Message Objects the stacktrace of the error is no longer reported & displayed in Elastic. Is it possible to still send the Stacktrace to elastic? - it is still useful for debugging as we have several sources of errors that require Parameterised Message Objects.

Appreciate we could add the stacktrace into the `custom` object however we were hoping to keep the logs in the same format as the logs where we are not using Parameterised Message Objects.

Thanks, Matthew

---

<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:** [March 9, 2020, 5:59am UTC](https://discuss.elastic.co/t/apm-captureerror-pass-in-stacktrace-when-using-parameterized-message-objects/219589/2 "2020-03-09T05:59:06Z")

</div>

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