Skip to content

Document Node.js profiler ability to use uploaded source maps#35801

Open
szegedi wants to merge 2 commits intomasterfrom
szegedi/nodejs-profiler-sourcemaps
Open

Document Node.js profiler ability to use uploaded source maps#35801
szegedi wants to merge 2 commits intomasterfrom
szegedi/nodejs-profiler-sourcemaps

Conversation

@szegedi
Copy link
Copy Markdown
Contributor

@szegedi szegedi commented Apr 7, 2026

What does this PR do? What is the motivation?

I'm documenting the ability for the Node.js profiler to use uploaded source maps.
As a minor edit, I'm also moving the optional steps to the end of the list of steps (in this case, reversing the orders of steps 4 and 5, so 5 and 6 are now the optional ones.)

Note for reviewers:

The link for source map uploads points to a page in the RUM guide, as that's the one that discusses source map uploading. While this is a minimal edit that can link to that documentation from profiler documentation, it raises few questions:

  • Should we mention Node.js profiling in the RUM guide page, similar to how it mentions Error Tracking and Browers Log Collection as other consumers of the data?
  • Should we otherwise edit that RUM guide and/or move the source maps upload to a more generic place?

Merge instructions

Merge readiness:

  • Ready for merge

For Datadog employees:

Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). Without this format, your pull request will not pass CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.

If your branch doesn't follow this format, rename it or create a new branch and PR.

[6/5/2025] Merge queue has been disabled on the documentation repo. If you have write access to the repo, the PR has been reviewed by a Documentation team member, and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #documentation channel in Slack.

AI assistance

Additional notes

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Preview links (active after the build_preview check completes)

Modified Files

@szegedi szegedi changed the title Szegedi/nodejs profiler sourcemaps Document Node.js profiler ability to use uploaded source maps Apr 7, 2026
@szegedi szegedi marked this pull request as ready for review April 7, 2026 14:34
@szegedi szegedi requested a review from a team as a code owner April 7, 2026 14:34
@szegedi szegedi force-pushed the szegedi/nodejs-profiler-sourcemaps branch from 6c36a8a to db11822 Compare April 7, 2026 14:40
Copy link
Copy Markdown
Contributor

@domalessi domalessi left a comment

Choose a reason for hiding this comment

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

Left a few suggestions! Let me know if you have any Qs. Otherwise, apply those fixes and we should be good to go.

{{< /tabs >}}

4. Optional: Set up [Source Code Integration][4] to connect your profiling data with your Git repositories.
4. A couple of minutes after you start your application, your profiles appear on the [APM > Profiler page][5]. If they do not, refer to the [Troubleshooting][9] guide.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
4. A couple of minutes after you start your application, your profiles appear on the [APM > Profiler page][5]. If they do not, refer to the [Troubleshooting][9] guide.
4. A couple of minutes after you start your application, your profiles appear on the [APM > Profiler page][5]. If they do not, see the [Troubleshooting][9] guide.

5. A couple of minutes after you start your application, your profiles appear on the [APM > Profiler page][5]. If they do not, refer to the [Troubleshooting][9] guide.
5. Optional: Set up [Source Code Integration][4] to connect your profiling data with your Git repositories.

6. Optional: [Upload Source Maps][10] (in Preview.) If you use source maps and you deploy them with your application the profiler will read them and produce mapped locations in profiles. Source maps in `.map` files as well as inline source maps are both supported. If you want to reduce deployment sizes (typically in serverless environments) you can choose to not deploy source maps and instead upload them to Datadog. You need to use dd-trace version 5.93.0 or newer for uploaded source maps to work, and your deployed source files still must contain the `@sourceMappingURL` annotation as an indication that they need to be mapped using the uploaded maps.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
6. Optional: [Upload Source Maps][10] (in Preview.) If you use source maps and you deploy them with your application the profiler will read them and produce mapped locations in profiles. Source maps in `.map` files as well as inline source maps are both supported. If you want to reduce deployment sizes (typically in serverless environments) you can choose to not deploy source maps and instead upload them to Datadog. You need to use dd-trace version 5.93.0 or newer for uploaded source maps to work, and your deployed source files still must contain the `@sourceMappingURL` annotation as an indication that they need to be mapped using the uploaded maps.
6. Optional: [Upload Source Maps][10] (Preview). If you use source maps, the profiler reads them and produces mapped locations in profiles. Source maps in `.map` files and inline source maps are both supported. To reduce deployment sizes (for example, in serverless environments), you can choose not to deploy source maps and instead upload them to Datadog.
**Note**: Uploaded source maps require dd-trace version 5.93.0 or newer. Your deployed source files must also contain the `@sourceMappingURL` annotation so the profiler knows to use the uploaded maps.

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.

2 participants