apm-agent-rum-js: sourcemap to error stack doesn't work
follow this page How to apply source maps to error stack traces when using minified bundles I am throwing an exception in vite+vue3 project(src/App.vue)
try {
throw 'Parameter is not a number!'
}
catch(err) {
// error is not defined
console.log(error)
}
and add the following configuration in the file vite.config.ts and run npm run bulid to generate the sourcemap
export default defineConfig({
plugins: [vue()],
build: {
sourcemap: true
},
In the end I got the sourcemap in the project folder,and configure nginx to point to this directory
dist
├── assets
│ ├── index.c447a54c.js
│ └── index.c447a54c.js.map
├── favicon.ico
└── index.html
Under this directory path, I execute curl and successfully upload the sourcemap to kibana
cd dist
curl -X POST "https://${kibana}/api/apm/sourcemaps" \
-H 'Content-Type: multipart/form-data' \
-H 'kbn-xsrf: true' \
-H 'Authorization: ApiKey ${key}' \
-F 'service_name="demo"' \
-F 'service_version="1.0"' \
-F 'bundle_filepath="assets/index.c447a54c.js"' \
-F 'sourcemap=@assets/index.c447a54c.js.map'
Response:
{
"type":"sourcemap",
"identifier":"\"demo\"-\"1.0\"",
...
}
But in kibana, the stack is not mapped to the code, as shown below
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 23 (9 by maintainers)
Commits related to this issue
- Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the example. In the original example, this will cause the id of the sourcemap mana... — committed to LHB6540/apm-server by LHB6540 2 years ago
- Fix wrong punctuation for arguments in curl commands (#9359) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the example. In ... — committed to elastic/apm-server by LHB6540 2 years ago
- Fix wrong punctuation for arguments in curl commands (#9359) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the example. In th... — committed to elastic/apm-server by LHB6540 2 years ago
- Fix wrong punctuation for arguments in curl commands (#9359) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the example. In th... — committed to elastic/apm-server by LHB6540 2 years ago
- Fix wrong punctuation for arguments in curl commands (#9359) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the example. In th... — committed to elastic/apm-server by LHB6540 2 years ago
- Fix wrong punctuation for arguments in curl commands (#9359) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the example. In th... — committed to elastic/apm-server by LHB6540 2 years ago
- Fix wrong punctuation for arguments in curl commands (#9359) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the example. In th... — committed to elastic/apm-server by LHB6540 2 years ago
- Fix wrong punctuation for arguments in curl commands (#9359) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the example. In th... — committed to elastic/apm-server by LHB6540 2 years ago
- Fix wrong punctuation for arguments in curl commands (#9359) (#11844) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the exa... — committed to elastic/apm-server by mergify[bot] 9 months ago
- Fix wrong punctuation for arguments in curl commands (#9359) (#11847) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the exa... — committed to elastic/apm-server by mergify[bot] 9 months ago
- Fix wrong punctuation for arguments in curl commands (#9359) (#11848) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the exa... — committed to elastic/apm-server by mergify[bot] 9 months ago
- Fix wrong punctuation for arguments in curl commands (#9359) (#11846) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the exa... — committed to elastic/apm-server by mergify[bot] 9 months ago
- Fix wrong punctuation for arguments in curl commands (#9359) (#11845) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the exa... — committed to elastic/apm-server by mergify[bot] 9 months ago
- Fix wrong punctuation for arguments in curl commands (#9359) (#11843) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the exa... — committed to elastic/apm-server by mergify[bot] 9 months ago
- Fix wrong punctuation for arguments in curl commands (#9359) * Fix wrong punctuation for arguments in curl commands Removed the redundant symbol " carried in the curl parameter in the example. In ... — committed to bmorelli25/observability-docs by LHB6540 2 years ago
Upgrading to 8.4 resolved our issues, thanks everyone for your time, effort and kindness ❤️