Dashboards & Visualizations

Modern JS Tooling Setup for Splunk App / Sourcemaps Not Working Properly

jdawsonqmulos
Observer

I'm working on a Splunk app which uses Webpack to bundle and compile the Javascript to ES5. I'm generating sourcemaps using the "source-map" devtool option in the webpack.config.

As detailed in this post by @aprummer , Splunk injects some lines of internationalization code during runtime at the top of each page, which throws off the reference points within the sourcemaps. @aprummer solved this by regenerating the sourcemaps with a line offset. I tried this approach offsetting the sourcemaps by the 5 lines added at the beginning of each file, and while I did see some success with some breakpoints being hit closer to the entry point of the JS code, they are still not matching up and variables are not resolving properly.

Has anyone else had any success with using Webpack and modern JS tooling within Splunk, and if so, how did you get source maps setup properly?

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...