Skip to content

JS source maps: Debug ID extraction#231

Open
manojVivek wants to merge 8 commits intomainfrom
v8-debug-id-clean
Open

JS source maps: Debug ID extraction#231
manojVivek wants to merge 8 commits intomainfrom
v8-debug-id-clean

Conversation

@manojVivek
Copy link

@manojVivek manojVivek commented Mar 10, 2026

supersedes the already approved PR #179, that was created before the upstream sync.

This PR implements the extraction of the debugId from the magic comment of the js file and passing that as part of the frame data, so that this can be used to source map the locations on the server.

@manojVivek manojVivek requested a review from umanwizard March 12, 2026 10:16
func extractDebugIDFromFile(pid libpf.PID, filePath string) libpf.FileID {
filePath = strings.TrimPrefix(filePath, "file://")
containerPath := fmt.Sprintf("/proc/%d/root%s", pid, filePath)
containerPath := filepath.Join(fmt.Sprintf("/proc/%d/root", pid), filePath)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

containerPath := filepath.Join("/proc", strconv.Itoa(pid), "root", filePath)

might be more idiomatic and performant?

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

Successfully merging this pull request may close these issues.

3 participants