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

ref(remix): Improve Remix SDK docs and wizard #5429

Merged
merged 6 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/includes/getting-started-verify/javascript.remix.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Add a button to a frontend component that throws an error.

```typescript {filename:routes/error.tsx}
<button
type="button"
Expand All @@ -11,6 +9,8 @@ Add a button to a frontend component that throws an error.
</button>
```

This snippet adds a button that throws an error in a component or page.

<Note>

Errors triggered from within Browser DevTools are sandboxed, so will not trigger an error handler. Place the snippet directly in your code instead.
Expand Down
2 changes: 1 addition & 1 deletion src/includes/sourcemaps/overview/javascript.remix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Remix can be configured to output source maps using Remix CLI. Learn more about

### 2: Provide Source Maps to Sentry

Source maps can be uploaded to Sentry by creating a release. Learn more about [how to upload source maps] (./uploading/).
Source maps can be uploaded to Sentry by creating a release. Learn more about [how to upload source maps](./uploading/).

<Note>

Expand Down
4 changes: 2 additions & 2 deletions src/includes/sourcemaps/upload/primer/javascript.remix.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
On release, call `yarn sentry-upload-sourcemaps` to upload source maps and create a release.
On release, call `yarn sentry-upload-sourcemaps` to upload source maps and create a release.

<Alert level="warning">

`sentry-upload-sourcemaps` requires either [`env` variables](/product/cli/configuration/#configuration-values) or a valid `.sentryclirc` file to pick up your project ID, organization ID, and token. You can create the `.sentryclirc` file with necessary configuration, as documented on this [page](/product/cli/configuration/).

</Alert>
Expand Down
1 change: 1 addition & 0 deletions src/platforms/javascript/common/install/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ notSupported:
- javascript.react
- javascript.vue
- javascript.wasm
- javascript.remix
---

<PageGrid />
14 changes: 12 additions & 2 deletions src/wizard/javascript/remix.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Sentry.init({
routingInstrumentation: Sentry.remixRouterInstrumentation(
useEffect,
useLocation,
useMatches,
useMatches
),
}),
],
Expand Down Expand Up @@ -85,4 +85,14 @@ function App() {
export default withSentry(App);
```

Once you've verified the library is initialized properly and sent a test event, consider visiting our [complete Remix docs](https://docs.sentry.io/platforms/javascript/guides/remix/). There, you'll find additional instructions for configuring the Remix SDK.
After this step, Sentry will report any uncaught exceptions triggered by your application.

You can trigger your first event from your development environment by raising an exception somewhere within your application. An example of this would be rendering a button whose `onClick` handler attempts to invoke a method that does not exist:

```javascript
<button type="button" onClick={methodDoesNotExist}>
Throw error
</button>
```

Once you've verified the SDK is initialized properly and sent a test event, check our our [complete Remix docs](https://docs.sentry.io/platforms/javascript/guides/remix/)for additional configuration instructions.