Skip to content

Update documentations for electron sourcemaps #29280

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cy-moi
Copy link
Contributor

@cy-moi cy-moi commented May 12, 2025

What does this PR do? What is the motivation?

We don't support unminification for Electron apps hosted in local files due to the stack trace prefix file://. We should mention this in the public documentation for clarification.

Merge instructions

Merge readiness:

  • Ready for merge

For Datadog employees:
Merge queue is enabled in this repo. Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). Without this format, your pull request will not pass in 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.

To have your PR automatically merged after it receives the required reviews, add the following PR comment:

/merge

Additional notes

@cy-moi cy-moi force-pushed the congyao/update-doc-for-electron-sourcemaps branch from 2969cba to 369fd6d Compare May 12, 2025 13:11
@github-actions github-actions bot added the Guide Content impacting a guide label May 12, 2025
Copy link
Contributor

@cy-moi cy-moi force-pushed the congyao/update-doc-for-electron-sourcemaps branch from 369fd6d to ff404ec Compare May 12, 2025 13:19
@cy-moi cy-moi force-pushed the congyao/update-doc-for-electron-sourcemaps branch from ff404ec to 167d050 Compare May 12, 2025 13:34
@datadog-datadog-prod-us1
Copy link

Datadog Summary

✅ Code Quality    ✅ Code Security    ✅ Dependencies


Was this helpful? Give us feedback!

@cy-moi cy-moi marked this pull request as ready for review May 12, 2025 13:50
@cy-moi cy-moi requested review from a team as code owners May 12, 2025 13:50
@brett0000FF brett0000FF self-assigned this May 12, 2025
Copy link
Contributor

@brett0000FF brett0000FF left a comment

Choose a reason for hiding this comment

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

LGTM--just two minor suggestions. Thanks!

@@ -49,6 +49,7 @@ To install the Datadog Browser SDK to support Electron apps:
The same-origin policy prevents tracking an application for the same session in which pages load from both local (`file://`) and remote (`http(s)://`).

This means that an application that uses Electron to embed a landing page, then later redirects the user to a website hosted on the Internet results in two sessions being created for that user - one for the embedded local files (`file://`) landing part of the application, and one for the remote part (`https://` files available on the internet).
**Note**: Unminified stack traces are not available when monitoring Electron applications that load embedded local files, when stack traces start with `file://`. To obtain unminified stack traces in this scenario, you must manually overwrite them using the [`beforeSend()` callback][2]. For further assistance, contact [Datadog customer support][5].
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
**Note**: Unminified stack traces are not available when monitoring Electron applications that load embedded local files, when stack traces start with `file://`. To obtain unminified stack traces in this scenario, you must manually overwrite them using the [`beforeSend()` callback][2]. For further assistance, contact [Datadog customer support][5].
**Note**: Unminified stack traces are not available when monitoring Electron applications that load embedded local files where stack traces start with `file://`. To obtain unminified stack traces in this scenario, you must manually overwrite them using the [`beforeSend()` callback][2]. For further assistance, contact the [Datadog Support team][5].

@@ -60,3 +61,4 @@ An issue with local storage replication latency between windows can cause a shor
[2]: /real_user_monitoring/browser/setup/
[3]: https://www.electronjs.org/docs/latest/tutorial/process-model#the-renderer-process
[4]: /real_user_monitoring/explorer/
[5]: https://www.datadoghq.com/support/
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[5]: https://www.datadoghq.com/support/
[5]: https://docs.datadoghq.com/help/

This is the typical place we send them from the docs for support.

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

Successfully merging this pull request may close these issues.

2 participants