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

x/sentry/index.d.ts

The Official Sentry Deno SDK
Go to Latest
import * as sentry from "https://deno.land/x/sentry@7.117.0/index.d.ts";

Classes

The Sentry Deno SDK Client.

c
Hub
deprecated

Holds additional event information. Scope.applyToEvent will be called by the client before an event will be sent.

Enums

E
Severity
deprecated

Variables

The extractTraceparentData function and TRACEPARENT_REGEXP constant used to be declared in this file. It was later moved into @sentry/utils as part of a move to remove @sentry/tracing dependencies from @sentry/node (extractTraceparentData is the only tracing function used by @sentry/node).

Patch toString calls to return proper name for wrapped functions.

v
Integrations
deprecated

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

Converts a HTTP status code into a SpanStatusType.

Functions

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

Add an event processor to the current client. This event processor will run for all events processed by this client.

Add a EventProcessor to be kept globally.

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.

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.

f
configureScope
deprecated

Callback to set context information onto the scope.

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.

Grabs active transaction off scope.

Get the currently active client.

f
getCurrentHub
deprecated

Returns the default hub instance.

Get the currently active scope.

Get the default integrations for the Deno SDK.

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

This will create a new Hub and add to the passed object on SENTRY.hub.

Get the currently active isolation scope. The isolation scope is active for the current exection context, meaning that it will remain stable for the same Hub.

Converts a HTTP status code into a SpanStatusType.

The Sentry Deno SDK Client.

Returns true if Sentry has been properly initialized.

This is the getter for lastEventId.

f
makeMain
deprecated

Replaces the current main hub with the passed one on the global object

Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.

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.

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.getSpan().

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.getSpan(), 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.

f
startTransaction
deprecated

Starts a new Transaction and returns it. This is the entry point to manual tracing instrumentation.

f
trace
deprecated

Wraps a function with a transaction/span and finishes the span after the function is done.

Attempts to fork the current isolation scope and the current scope based on the current async context strategy. 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

JSDoc

JSDoc

Configuration options for the Sentry Deno SDK

JSDoc

JSDoc

JSDoc

Request data included in an event as sent to Sentry

Span holding trace_id, span_id

JSDoc

JSDoc

JSDoc

Transaction "Class", inherits Span only has setName

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