Skip to main content
Module

x/sentry/index.mjs

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

Classes

The Sentry Deno SDK Client.

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

Functions

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

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. This accepts an event hint as optional second parameter. Alternatively, you can also pass a CaptureContext directly as second parameter.

Captures a message event and sends it to Sentry.

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

Callback to set context information onto the scope.

Creates an instance of a Sentry Transport

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

Returns the currently active span.

Grabs active transaction off scope, if any

Get the currently active client.

Returns the default hub instance.

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

The Sentry Deno SDK Client.

This is the getter for lastEventId.

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.

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.

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.

Converts a HTTP status code into a SpanStatusType.

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

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.

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

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

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

Creates a new scope with and executes the given operation within. The scope is automatically removed once the operation finishes or throws.

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

JSDoc

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