Home / Companies / Polar Signals / Blog / Post Details
Content Deep Dive

JavaScript Source Maps Support in Polar Signals Cloud

Blog post from Polar Signals

Post Details
Company
Date Published
Author
Manoj Vivek
Word Count
415
Language
-
Hacker News Points
-
Summary

Profiling Node.js applications in production often results in flame charts with minified JavaScript function names, making debugging challenging. To address this, Polar Signals Cloud now supports JavaScript and TypeScript source maps, enabling developers to view original function names and file paths in profiles. This is achieved by injecting debug IDs into JavaScript files and their source maps during the build process, which are then uploaded to Polar Signals Cloud. At runtime, Parca Agent links profile data to the appropriate source maps using these IDs, and during query time, Polar Signals resolves the minified names back to the original source. Developers can integrate source map uploads into their existing CI build processes using either a plugin for esbuild or a CLI tool for other build systems. Debug IDs are deterministic, ensuring efficient handling of duplicates. Deploying with Parca Agent v0.47.0 or later allows for accurate profiling with original TypeScript function names displayed.