Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source maps uploaded successfully, but not used in stacktrace. #866

Open
ivanushkaPr opened this issue Jun 3, 2024 · 1 comment
Open

Comments

@ivanushkaPr
Copy link

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
        })
    },
}
  1. 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',
    },
});
  1. Upload source maps and check their availability.
  2. Execute error in project.
  3. As result, no source maps available in stack trace and error showed in minified format.

Debug logs
Attach your debug logs.
See the documentation
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?

@simitt
Copy link
Contributor

simitt commented Jun 3, 2024

Hi @ivanushkaPr, sorry to hear that you are experiencing issues with sourcemaps. We like to keep the github repos for confirmed bugs and enhancements and discuss problems and feedback on missing documentation etc in the elastic apm discuss forum. Would you please open an issue there, best to tag it with rum and server, and also include the apm-server version and share any helpful indicators from the apm-server logs if available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants