Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default Sentry.withSentry((env) => ({ dsn: "__DSN__" }), {
<PlatformSection supported={["javascript.deno"]}>

```javascript
import * as Sentry from "npm:@sentry/deno";
import * as Sentry from "___SDK_PACKAGE___";
import postgres from "npm:postgres";

const sql = Sentry.instrumentPostgresJsSql(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ You need to have both the Sentry SDK and the Supabase library installed. For Sup

## Configuration

This is the preferred method for most use cases. and follows Sentry's standard integration pattern.
This is the preferred method for most use cases and follows Sentry's standard integration pattern.

```javascript
import * as Sentry from "___SDK_PACKAGE___";
import { createClient } from '@supabase/supabase-js';

const supabaseClient = createClient('YOUR_SUPABASE_URL', 'YOUR_SUPABASE_KEY');

Sentry.init({
dsn: 'YOUR_DSN',
dsn: "___PUBLIC_DSN___",
integrations: [
Sentry.supabaseIntegration({ supabaseClient })
],
Expand Down
4 changes: 2 additions & 2 deletions docs/platforms/javascript/guides/deno/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Import the Sentry Deno SDK directly from the npm registry, before importing any
<SplitSectionCode>

```javascript {filename: main.ts}
import * as Sentry from "npm:@sentry/deno";
import * as Sentry from "___SDK_PACKAGE___";
// your other imports
```

Expand All @@ -63,7 +63,7 @@ Initialize Sentry as early as possible in your app:
<SplitSectionCode>

```javascript {filename: main.ts}
import * as Sentry from "npm:@sentry/deno";
import * as Sentry from "___SDK_PACKAGE___";
// your other imports

Sentry.init({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```javascript {tabTitle: JavaScript}
import * as Sentry from "npm:@sentry/deno";
import * as Sentry from "___SDK_PACKAGE___";

Sentry.init({
dsn: "___PUBLIC_DSN___",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```javascript {tabTitle: JavaScript}
import * as Sentry from "npm:@sentry/deno";
import * as Sentry from "___SDK_PACKAGE___";

Sentry.init({
dsn: "___PUBLIC_DSN___",
Expand Down
2 changes: 1 addition & 1 deletion platform-includes/configuration/dedupe/javascript.deno.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```javascript {tabTitle: JavaScript}
import * as Sentry from "npm:@sentry/deno";
import * as Sentry from "___SDK_PACKAGE___";

Sentry.init({
dsn: "___PUBLIC_DSN___",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```javascript {tabTitle: JavaScript}
import * as Sentry from "npm:@sentry/deno";
import * as Sentry from "___SDK_PACKAGE___";

Sentry.init({
dsn: "___PUBLIC_DSN___",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```javascript {tabTitle: JavaScript}
import * as Sentry from "npm:@sentry/deno";
import * as Sentry from "___SDK_PACKAGE___";

Sentry.init({
dsn: "___PUBLIC_DSN___",
Expand Down
2 changes: 1 addition & 1 deletion platform-includes/crons/setup/javascript.deno.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ _requires SDK version 7.88.0 or higher_
Use the `DenoCron` integration to monitor your [`Deno.cron`](https://deno.com/blog/cron) calls and get notified when a schedule job is missed (or doesn't start when expected), if it fails due to a problem in the runtime (such as an error), or if it fails by exceeding its maximum runtime.

```TypeScript
import * as Sentry from "npm:@sentry/deno";
import * as Sentry from "___SDK_PACKAGE___";

Sentry.init({
dsn: "___PUBLIC_DSN___",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```javascript
import * as Sentry from "npm:@sentry/deno";
import * as Sentry from "___SDK_PACKAGE___";

Sentry.init({
dsn: "___PUBLIC_DSN___",
Expand Down
7 changes: 6 additions & 1 deletion src/components/platformSdkPackageName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export async function getSdkPackageName(
return null;
}

const useNpmSpecifier = platformOrGuide.name === 'deno';
if (useNpmSpecifier && sdkData.canonical.startsWith('npm:')) {
return sdkData.canonical;
}
return sdkData.canonical.replace(/^npm:/, '') || null;
}

Expand All @@ -47,6 +51,7 @@ export async function PlatformSdkPackageName({fallback}: PlatformSdkPackageNameP
const platformOrGuide = getCurrentPlatformOrGuide(rootNode, path);

const sdkPackage = await getSdkPackageName(platformOrGuide);
const displayName = sdkPackage?.replace(/^npm:/, '') || fallbackName;

return <code>{sdkPackage || fallbackName} </code>;
return <code>{displayName} </code>;
}
Loading