Hello everone, I am trying to setup frontend sourcemaps for better error reporting in kibana APM. I tried many things but nothing seems to work and the errors keep being reported with the production filenames instead of the source names. Here's what I have done maybe someone will find my mistake or point where I should be looking? I have followed this guide Create and upload source maps (RUM) | Elastic Docs
For testing purposes I created a "dummy" error in the application and made sure it was correctly reported:
I then uploaded the 2 concerned chunks with this curl:
curl -X POST --insecure "$KIBANA_SOURCEMAP_ENDPOINT" \
-H "Content-Type: multipart/form-data" \
-H "kbn-xsrf: true" \
-H "Authorization: ApiKey $KIBANA_API_KEY" \
-F "service_name=x-frontend" \
-F "service_version=1.0" \
-F "bundle_filepath=chunk-RN6WJJYZ.js" \
-F "sourcemap=@./chunk-RN6WJJYZ.js.map"
Making sure that the metadata from the error show consistent service name and version
Disclaimer: the X both in the curl service_name and the image are exactly the same value, hidden to hide the application name.
I have then validated that the sourcemaps were correctly stored using
curl -X GET--insecure "$KIBANA_SOURCEMAP_ENDPOINT" \
-H "kbn-xsrf: true" \
-H "Authorization: ApiKey $KIBANA_API_KEY"
Which returned
{
"artifacts": [
{
"type": "sourcemap",
"identifier": "x-frontend-1.0",
"relative_url": "/api/fleet/artifacts/x-frontend-1.0/64dbd6a66d6f47d34cad54cc3a196814c11348da0ff709acc7c62e978b505254",
"body": {
"serviceName": "x-frontend",
"serviceVersion": "1.0",
"bundleFilepath": "chunk-5NR7QMPW.js",
"sourceMap": {
"version": 3,
"sources": ["..."],
"sourcesContent": ["..."],
"mappings": "...",
"names": ["..."]
}
},
"created": "2026-04-16T13:27:39.084Z",
"id": "apm:x-frontend-1.0-64dbd6a66d6f47d34cad54cc3a196814c11348da0ff709acc7c62e978b505254",
"compressionAlgorithm": "zlib",
"decodedSha256": "64dbd6a66d6f47d34cad54cc3a196814c11348da0ff709acc7c62e978b505254",
"decodedSize": 124121,
"encodedSha256": "043f0eef04e776b75a40ed4665efaca7ab76601708906d71a5091206527c7748",
"encodedSize": 28917,
"encryptionAlgorithm": "none",
"packageName": "apm"
},
{
"type": "sourcemap",
"identifier": "x-frontend-1.0",
"relative_url": "/api/fleet/artifacts/x-frontend-1.0/f234fb0d0952addf110852ce9cb07e39fd40fe0471c6c579856761d8348d9ed1",
"body": {
"serviceName": "x-frontend",
"serviceVersion": "1.0",
"bundleFilepath": "chunk-RN6WJJYZ.js",
"sourceMap": {
"version": 3,
"sources": ["..."],
"sourcesContent": ["..."],
"mappings": "...",
"names": ["..."],
"x_google_ignoreList": ["..."]
}
},
"created": "2026-04-16T13:27:44.383Z",
"id": "apm:x-frontend-1.0-f234fb0d0952addf110852ce9cb07e39fd40fe0471c6c579856761d8348d9ed1",
"compressionAlgorithm": "zlib",
"decodedSha256": "f234fb0d0952addf110852ce9cb07e39fd40fe0471c6c579856761d8348d9ed1",
"decodedSize": 1544257,
"encodedSha256": "67e8f5466814e3adacb8a0005cb51147fb8e56e0647910f4af7cd794006e338b",
"encodedSize": 351572,
"encryptionAlgorithm": "none",
"packageName": "apm"
}
]
}
I have also tried to upload the sourcemap using absolute URLs using the exact file paths on the server but that did not change anything.
I have also tried waiting different intervals after the upload of the sourcemaps to trigger the error again, 5 mins, 1hour, 12 hour...Because, we never know ![]()
Any idea where I should be looking to troubleshoot this?

