Skip to content

Conversation

inventarSarah
Copy link
Collaborator

@inventarSarah inventarSarah commented Oct 23, 2025

DESCRIBE YOUR PR

This PR focuses on transforming the existing Electron guide into a Quick Start guide.

Notes:

  • I've removed the information about the Wizard. After testing it, I found that it created a file where I can add my project/org data, but it didn't set up the SDK (like the Next.js wizard, for example). This could be frustrating for users. Please let me know what you think and if I've missed something!
  • I added a new section, verify > I tested the code snippets locally, and they worked in my setup, but please have a good look at them

Next steps:
You will notice that I haven't changed much for Steps number 3,4,5, and 7. The content in these sections seems to advanced for a quick start guide.
I plan to create a follow-up ticket to move this content to other pages within the Electron docs (of course, we will link to them from the quick start guide).
I noticed that @timfish handles a lot of the Electron SDK work, and you seem like the person to involve when changing the docs. Is that correct? If so, I will @ you in the follow-up ticket so we can align on the changes.

Thanks!!

Closes #15269

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

EXTRA RESOURCES

@vercel
Copy link

vercel bot commented Oct 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sentry-docs Ready Ready Preview Comment Oct 23, 2025 10:07am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
develop-docs Ignored Ignored Oct 23, 2025 10:07am

Copy link
Collaborator

@timfish timfish left a comment

Choose a reason for hiding this comment

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

Just a few comments around setup and preload.

Basically we don't want the SDK setup to vary by Electron config because it's not required and too complex.

### Configure the Renderer Process

```javascript
Initialize the SDK in your Electron renderer process. You can do this in either a preload script (`preload.(js|ts)`) or directly in your renderer script (`renderer.(js|ts)`):
Copy link
Collaborator

Choose a reason for hiding this comment

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

With contextIsolation: true, you cannot configure in either preload/renderer, you would need to configure the SDK in both. However see below for more explanation around this...

Basically, just instruct users to init in the renderer(s)

Initialize the SDK in your Electron renderer processes:

I wouldn't specifically mention file names (ie. renderer.(js|ts)) because these file names can vary depending on framework or whatever template the app was created from.

<Expandable title="Should you use a preload script or renderer script?">

Choose based on your app's setup:

Copy link
Collaborator

@timfish timfish Oct 23, 2025

Choose a reason for hiding this comment

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

If contextIsolation: true (Electron default/recommended), the preload and renderer code run in different isolated contexts. This means technically, if you want to catch errors in both preload and renderer contexts, you should init the SDK in both.

If contextIsolation: false, the preload and renderer code run in the same context so you could technically just init in one of preload/renderer and it would capture errors from both.

However, many users starting out with Electron won't even know what a preload script is. Preload scripts need to be bundled so helping users configure them is non-trivial. We don't actually need the preload to be configured for the SDK to work and we don't want the SDK setup to vary by Electron configuration.

Regardless of Electron configuration, the most reliable way to have the SDK just work in the majority of cases is to init in the main and init in all renderers and just ignore the preload entirely.

Preload configuration is more of an advanced topic and won't be needed by most users.

```

## Offline Support
## Step 3: Offline Support (Optional)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wouldn't even mention Offline Support in the basic intro docs.

I also wouldn't say that this is (Optional) either because it's enabled by default and most users don't need to worry about it.

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.

Create Electron Quick Start guide

2 participants