elastic / elastic/apm

Source maps uploaded successfully, but not used in stacktrace.

Open
#866 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Gherkin
Stars
427
Forks
125
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Source maps uploaded successfully, but not applied to observed project stacktrace.

**To Reproduce**

1. Install "@elastic/apm-rum-vue": "^2.1.2".
2. Configure vue.cli.config.
const serviceVersion = require("./package.json").version;
const TerserPlugin = require("terser-webpack-plugin");
```
module.exports = {
configureWebpack: {
devtool: 'source-map',
devServer: {
host: YourHostName,
},
optimization: {
chunkIds: 'named',
minimize: true,
minimizer: [new TerserPlugin(
{
sourceMap: true,
},
)],
},
},
chainWebpack: config => {
config.plugin('define').tap(args => {
args[0].serviceVersion = JSON.stringify(serviceVersion);
return args
})
},
}
```
3. Add plugin to vue project and add configuration.

```
import { ApmVuePlugin } from "@elastic/apm-rum-vue";
import apmRumDefaultConfig from "@/config/apm-rum-default-config";

Vue.use(ApmVuePlugin, {
router,
config: {
active: true,
serviceName: 'your-service-name',
serviceVersion: '1.0.0',
serverUrl: 'https://youServerUrl.com',
serverUrlPrefix: '',
environment: 'test',
},
});
```
4. Upload source maps and check their availability.
5. Execute error in project.
6. As result, no source maps available in stack trace and error showed in minified format.

**Debug logs**
Attach your debug logs.
See the [documentation](https://www.elastic.co/guide/en/apm/agent/java/current/trouble-shooting.html#trouble-shooting-logging)
about how to enable debug logging.

I read documentation, but i dont find any clue, about how can i check that my sourcemaps are used for my project?
Is there any api, that can help me with this? Or is there any api call in network tab, there i can found any clue about why uploaded maps doesnt used in stacktrace?

It looks like all is perfectly fine at first glance, because webpack not throwing any errors. And all source map are successfully uploaded to endpoint. Plz help me, because i dont know how to solve this problem, without a debug log. There i can find any clues about what happening in the kibana, then i open up stacktrace and how sourcemaps being used by it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.