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

x/sentry/index.mjs

The Official Sentry Deno SDK
Go to Latest
import * as sentry from "https://deno.land/x/sentry@8.0.0-rc.3/index.mjs";

Classes

The Sentry Deno SDK Client.

Holds additional event information.

Variables

Adds a breadcrumbs for console, fetch, and sentry events.

Send Console API calls as Sentry Events.

Adds source context to event stacktraces.

Continue a trace from sentry-trace and baggage values. These values can be obtained from incoming request headers, or in the browser from <meta name="sentry-trace"> and <meta name="baggage"> HTML tags.

Deduplication filter.

Adds Deno related context to events. This includes contexts about app, device, os, v8, and TypeScript.

Instruments Deno.cron to automatically capture cron check-ins.

Patch toString calls to return proper name for wrapped functions.

Instruments global error and unhandledrejection listeners in Deno.

Normalises paths to the app root directory.

Add data about a request to an event. Primarily for use in Node-based SDKs, but included in @sentry/core so it can be used in cross-platform SDKs like @sentry/nextjs.

Rewrite event frames paths.

Use this attribute to represent the operation of a span.

Use this attribute to represent the origin of a span.

Use this attribute to represent the sample rate used for a span.

Use this attribute to represent the source of a span. Should be one of: custom, url, route, view, component, task, unknown

This function adds duration since the sessionTimingIntegration was initialized till the time event was sent.

Functions

Records a new breadcrumb which will be attached to future events.

Add an event processor. This will be added to the current isolation scope, ensuring any event that is processed in the current execution context will have the processor applied.

Create a cron monitor check in and send it to Sentry.

Captures a manually created event and sends it to Sentry.

Captures an exception event and sends it to Sentry.

Send user feedback to Sentry.

Captures a message event and sends it to Sentry.

Sends the current session on the scope to Sentry

Call close() on the current client, if there is one. See Client.close.

Creates an instance of a Sentry Transport

End the session on the current isolation scope.

Call flush() on the current client, if there is one. See Client.flush.

Returns the currently active span.

Get the currently active client.

Get the currently active scope.

Get the default integrations for the Deno SDK.

Get the global scope. This scope is applied to all events.

Get the currently active isolation scope. The isolation scope is active for the current exection context.

Returns the root span of a given span.

Converts a HTTP status code into a sentry status with a message.

The Sentry Deno SDK Client.

Returns true if Sentry has been properly initialized.

Sets context data with the given name.

Make the given client the current client.

Set key:value that will be sent as extra data with the event.

Set an object that will be merged sent as extra data with the event.

Sets the Http status attributes on the current span based on the http code. Additionally, the span's status is updated, depending on the http code.

Adds a measurement to the current active transaction.

Set key:value that will be sent as tags data with the event.

Set an object that will be merged sent as tags data with the event.

Updates user context information for future events.

Convert a Span to a baggage header.

Convert a span to a JSON representation.

Convert a Span to a Sentry trace header.

Creates a span. This span is not set as active, so will not get automatic instrumentation spans as children or be able to be accessed via Sentry.getActiveSpan().

Start a session on the current isolation scope.

Wraps a function with a transaction/span and finishes the span after the function is done. The created span is the active span and will be used as parent by other spans created inside the function and can be accessed via Sentry.getActiveSpan(), as long as the function is executed while the scope is active.

Similar to Sentry.startSpan. Wraps a function with a transaction/span, but does not finish the span after the function is done automatically. You'll have to call span.end() manually.

Set the provided isolation scope as active in the given callback. If no async context strategy is set, the isolation scope and the current scope will not be forked (this is currently the case, for example, in the browser).

Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.

Set the given scope as the active scope in the callback.

Interfaces

Sentry uses breadcrumbs to create a trail of events that happened prior to an issue. These events are very similar to traditional logs but can record more rich structured data.

JSDoc

Configuration options for the Sentry Deno SDK

JSDoc

JSDoc

JSDoc

Request data included in an event as sent to Sentry

A generic Span which holds trace data.

JSDoc

JSDoc

JSDoc

An interface describing a user of an application or a handled request.

Type Aliases

Options deciding what parts of the request to use when enhancing an event

A Request type compatible with Node, Express, browser, etc., because everything is optional