Skip to content

Commit

Permalink
feat(deno): Add basic Deno docs
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish committed Dec 8, 2023
1 parent 216ca54 commit 46fcdab
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/data/platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,6 @@
- slug: bun
type: framework
name: Bun
- slug: deno
type: framework
name: Deno
20 changes: 20 additions & 0 deletions src/platform-includes/getting-started-config/javascript.deno.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

```javascript
// Import from the Deno registry
import * as Sentry from "https://deno.land/x/sentry/index.mjs";

// or import from npm registry
import * as Sentry from 'npm:@sentry/deno';

Sentry.init({
dsn: '___PUBLIC_DSN___',
// ...
});
```

To ensure the SDK can send events, you should enable network access for your
ingestion domain:

```bash
deno run index.ts --allow-net=___ORG_INGEST_DOMAIN___
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Note>

The Deno SDK is currently in Beta.

</Note>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Allow access to your source files

To ensure the SDK can include your source code in stack traces, you should enable read access for your source files:

```bash
deno run index.ts --allow-read=./src
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Verify your setup by adding the following snippet anywhere in your code and running it:

```javascript
setTimeout(() => {
throw new Error();
});
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<SignInNote />

```javascript
// Import from the Deno registry
import * as Sentry from "https://deno.land/x/sentry/index.mjs";

// or import from npm registry
import * as Sentry from 'npm:@sentry/deno';

Sentry.init({
dsn: "___PUBLIC_DSN___",

// 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/],
});
```
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Tracing is enabled by default in the Sentry Deno SDK.
1 change: 1 addition & 0 deletions src/platforms/common/crons/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ supported:
- javascript.remix
- javascript.astro
- javascript.bun
- javascript.deno
- go
- ruby
description: "Learn how to enable Cron Monitoring in your app"
Expand Down
1 change: 1 addition & 0 deletions src/platforms/common/crons/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ supported:
- javascript.remix
- javascript.astro
- javascript.bun
- javascript.deno
- ruby
description: "Learn how to troubleshoot your Cron Monitoring setup."
---
Expand Down
4 changes: 4 additions & 0 deletions src/platforms/common/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,16 @@ See our <PlatformLink to="/integrations/">Integrations</PlatformLink> page to ge

Don't already have an account and Sentry project established? Head over to [sentry.io](https://sentry.io/signup/), then return to this page.

<PlatformSection notSupported={["javascript.deno"]}>

## Install

Sentry captures data by using an SDK within your application’s runtime.

<PlatformContent includePath="getting-started-install" />

</PlatformSection>

## Configure

<PlatformSection notSupported={["android", "unity", "unreal", "javascript.nextjs", "javascript.astro", "apple.ios"]}>
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 @@ -6,6 +6,7 @@ notSupported:
- javascript.angular
- javascript.astro
- javascript.bun
- javascript.deno
- javascript.capacitor
- javascript.cordova
- javascript.electron
Expand Down
1 change: 1 addition & 0 deletions src/platforms/javascript/common/profiling/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ supported:
notSupported:
- javascript.bun
- javascript.cordova
- javascript.deno
description: "Learn what transactions are captured after tracing is enabled."
---

Expand Down
8 changes: 8 additions & 0 deletions src/platforms/javascript/guides/deno/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title: Deno
sdk: sentry.javascript.deno
fallbackPlatform: javascript
caseStyle: camelCase
supportLevel: production
icon: deno
categories:
- server

0 comments on commit 46fcdab

Please sign in to comment.