APM is not converting JS stacks to Type script stacks

Hello,

We have recently migrated our code base to type script. We have set it in a way that all the tools we use during runtime and if we manually print stack traces of errors on running environments, those are correctly mapped back to original typescript code.

Except for APM, which is still pointing to transpiled JS code.

Following this guidelines I can confirm all what is described here is set as in the text

In order to ensure that the Elastic APM Node.js agent correctly maps stack traces to your original TypeScript files, could you please check that your transpiled JavaScript files include source maps. The Elastic APM Node.js agent supports source maps by default, which allows it to collect the correct stack traces and even the original source code if available.

Basically, please ensure that your build process generates source maps for your TypeScript files. This typically involves setting the sourceMap option to true in your tsconfig.json file. Also, please make sure that your transpiled JavaScript files contain a sourceMappingURL comment at the bottom.

For optimal support, you can either inline the original source code using the sourcesContent property inside the source map or deploy the original source code to your production server along with the transpiled code. Ensure that the original source code is accessible via the file system at the path specified with the sourceRoot property in the source map.

Versions:
"elastic-apm-node": "4.7.3",
node: 20.14.0
"source-map-support": "0.5.21",