[go: nahoru, domu]

Skip to content
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

Add electron frontend setup documentation #8830

Open
linear bot opened this issue Jun 21, 2024 · 2 comments
Open

Add electron frontend setup documentation #8830

linear bot opened this issue Jun 21, 2024 · 2 comments

Comments

@linear
Copy link
linear bot commented Jun 21, 2024

No description provided.

Copy link
Author
linear bot commented Jun 21, 2024

Copy link
greptile-apps bot commented Jun 21, 2024

To add Electron frontend setup documentation, follow these steps:

  1. Create a new Markdown file electron.md in docs-content/getting-started/3_client-sdk.

  2. Add the following content to electron.md:

---
title: Electron
slug: electron
createdAt: 2023-10-01T00:00:00.000Z
updatedAt: 2023-10-01T00:00:00.000Z
---

## Getting Started with Electron

To integrate Highlight.io with your Electron application, follow these steps:

### Install the SDK

```bash
npm install highlight.run

Initialize the SDK

In your main process file (e.g., main.js), initialize the Highlight SDK:

const { app } = require('electron');
const H = require('highlight.run');

app.on('ready', () => {
  H.init('<YOUR_PROJECT_ID>', {
    tracingOrigins: ['localhost', 'yourdomain.com'],
    networkRecording: {
      enabled: true,
      recordHeadersAndBody: true,
    },
  });
});

Capture Errors

To capture errors in your Electron app, use the following code:

process.on('uncaughtException', (error) => {
  H.captureException(error);
});

process.on('unhandledRejection', (reason, promise) => {
  H.captureException(reason);
});

Additional Configuration

Refer to the Highlight.io documentation for more configuration options and advanced usage.


3. Update `index.md` in `docs-content/getting-started/3_client-sdk` to include a link to the new Electron setup guide:

```markdown
<DocsCard title="Electron" href="./electron.md">
  {"Install the `highlight.run` client bundle in your Electron app."}
</DocsCard>

References

/docs-content/getting-started/3_client-sdk
/docs-content/getting-started/3_client-sdk/7_replay-configuration
/docs-content/getting-started/2_frontend-backend-mapping.md

Ask Greptile

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

No branches or pull requests

0 participants