Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/sentry/index.d.ts>init

The Official Sentry Deno SDK
Latest
function init
import { init } from "https://deno.land/x/sentry@8.39.0-beta.0/index.d.ts";

The Sentry Deno SDK Client.

To use this SDK, call the init function as early as possible in the main entry module. To set context information or send manual events, use the provided methods.

Examples

Example 1


import { init } from 'npm:@sentry/deno';

init({
  dsn: '__DSN__',
  // ...
});

Example 2


import { addBreadcrumb } from 'npm:@sentry/deno';
addBreadcrumb({
  message: 'My Breadcrumb',
  // ...
});

Example 3


import * as Sentry from 'npm:@sentry/deno';
Sentry.captureMessage('Hello, world!');
Sentry.captureException(new Error('Good bye'));
Sentry.captureEvent({
  message: 'Manual',
  stacktrace: [
    // ...
  ],
});

Parameters

optional
options: DenoOptions

Returns

Client