elastic / elastic/apm-agent-nodejs
stackTraceLimit: 0 removes the stacktraces outside of elastic APM
- Dominant language
- JavaScript
- Stars
- 594
- Forks
- 244
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 16
Description
**To Reproduce**
The following program :
```js
const apmModule = require('elastic-apm-node');
apmModule.start({
stackTraceLimit: 0,
serverUrl: 'xxx',
secretToken: 'yyy',
active: true,
centralConfig: false,
});
const main = () => {
console.trace('abcd')
console.log(new Error().stack)
}
main()
```
prints :
```
[object Object]
Error
```
(ie. it doesn't print the stack frames)
**Expected behavior**
- `stackTraceLimit: 0` should only disable the stack trace collection for elastic APM, but still show the stack frame in Error.stack or console.trace.
- When doing `console.trace(message)`, the message should be printed instead of `[object Object]`
**Environment (please complete the following information)**
- OS: macOS 11.6.2
- Node.js version:
- APM Server version:
- Agent version: 3.27.0
Contributor guide
Assessment
This issue has not been assessed yet.