-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: Add Bun docs #7858
Merged
feat: Add Bun docs #7858
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
65923fe
feat: Add Bun docs
HazAT edfeb06
style(lint): Auto commit lint changes
getsantry[bot] 5c7236d
style(lint): Auto commit lint changes
getsantry[bot] c7cdff4
ref: Bun
HazAT 8eea1f3
feat: Update bun docs
HazAT 4bdf911
feat: Add icon to Platform
HazAT d6d5012
ref: Remove auto instrumentation hint
HazAT 8244754
style(lint): Auto commit lint changes
getsantry[bot] 29f9452
style(lint): Auto commit lint changes
getsantry[bot] bc460ef
ref: Add Beta
HazAT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,3 +107,6 @@ | |
type: language | ||
name: Dart | ||
case_style: camelCase | ||
- slug: bun | ||
type: framework | ||
name: Bun |
19 changes: 19 additions & 0 deletions
19
src/platform-includes/getting-started-config/javascript.bun.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Once installed, you can capture exceptions manually for now. | ||
|
||
<Alert level="warning" title="Note"> | ||
|
||
It's not possible to capture unhandled exceptions, unhandled promise rejections now - Bun is working on adding support for it. | ||
[Github Issue](https://github.com/oven-sh/bun/issues/5091) follow this issue. | ||
|
||
</Alert> | ||
|
||
<SignInNote /> | ||
|
||
```javascript {tabTitle:ESM} | ||
import * as Sentry from "@sentry/bun"; | ||
|
||
Sentry.init({ | ||
dsn: "___PUBLIC_DSN___", | ||
tracesSampleRate: 1.0, | ||
}); | ||
``` |
3 changes: 3 additions & 0 deletions
3
src/platform-includes/getting-started-install/javascript.bun.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```bash {tabTitle:Bun} | ||
bun add @sentry/bun | ||
``` |
Empty file.
16 changes: 16 additions & 0 deletions
16
src/platform-includes/getting-started-verify/javascript.bun.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
```javascript | ||
const transaction = Sentry.startTransaction({ | ||
op: "test", | ||
name: "My First Test Transaction", | ||
}); | ||
|
||
setTimeout(() => { | ||
try { | ||
foo(); | ||
} catch (e) { | ||
Sentry.captureException(e); | ||
} finally { | ||
transaction.finish(); | ||
} | ||
}, 99); | ||
``` |
1 change: 1 addition & 0 deletions
1
...latform-includes/performance/automatic-instrumentation-intro/javascript.bun.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The Sentry SDK provides a `Tracing` integration to add automatic instrumentation for monitoring the performance of your application. |
17 changes: 17 additions & 0 deletions
17
src/platform-includes/performance/configure-sample-rate/javascript.bun.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<SignInNote /> | ||
|
||
```javascript | ||
import * as Sentry from "@sentry/bun"; | ||
|
||
Sentry.init({ | ||
dsn: "___PUBLIC_DSN___", | ||
integrations: [new Sentry.Tracing()], | ||
|
||
// We recommend adjusting this value in production, or using tracesSampler | ||
// for finer control | ||
tracesSampleRate: 1.0, | ||
|
||
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled | ||
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], | ||
}); | ||
``` |
17 changes: 17 additions & 0 deletions
17
...atform-includes/performance/enable-automatic-instrumentation/javascript.bun.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
To enable tracing, include the `Tracing` integration in your SDK configuration options. | ||
|
||
<SignInNote /> | ||
|
||
```javascript | ||
import * as Sentry from "@sentry/bun"; | ||
|
||
Sentry.init({ | ||
dsn: "___PUBLIC_DSN___", | ||
|
||
integrations: [new Sentry.Tracing()], | ||
|
||
// We recommend adjusting this value in production, or using tracesSampler | ||
// for finer control | ||
tracesSampleRate: 1.0, | ||
}); | ||
``` |
1 change: 1 addition & 0 deletions
1
src/platform-includes/performance/enable-tracing/javascript.bun.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Tracing is available by default in the Sentry Bun. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
title: Bun | ||
sdk: sentry.javascript.bun | ||
fallbackPlatform: javascript | ||
caseStyle: camelCase | ||
supportLevel: production | ||
categories: | ||
- browser | ||
- server |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these docs make more sense to live here, in the browser JS frameworks, or in the Node frameworks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah good point, we discussed this
it's either/or 😅
At one point we might just merge Javascript and Node together.