Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/sentry_deno/packages/types/src/index.ts>ClientOptions

Unofficial port of the Sentry SDK for JavaScript to Deno.
Latest
interface ClientOptions
import { type ClientOptions } from "https://deno.land/x/sentry_deno@v0.2.2/packages/types/src/index.ts";

Properties

optional
debug: boolean

Enable debug functionality in the SDK itself

optional
enabled: boolean

Specifies whether this SDK should send events to Sentry. Defaults to true.

optional
attachStacktrace: boolean

Attaches stacktraces to pure capture message / log integrations

optional
autoSessionTracking: boolean

A flag enabling Sessions Tracking feature. By default, Sessions Tracking is enabled.

optional
sendClientReports: boolean

Send SDK Client Reports. By default, Client Reports are enabled.

optional
dsn: string

The Dsn used to connect to Sentry and identify the project. If omitted, the SDK will not send any data to Sentry.

optional
release: string

The release identifier used when uploading respective source maps. Specify this value to allow Sentry to resolve the correct source maps when processing events.

optional
environment: string

The current environment of your application (e.g. "production").

optional
dist: string

Sets the distribution for all events

integrations: Integration[]

List of integrations that should be installed after SDK was initialized.

transport: (transportOptions: TO) => Transport

A function that takes transport options and returns the Transport object which is used to send events to Sentry. The function is invoked internally when the client is initialized.

stackParser: StackParser

A stack parser implementation By default, a stack parser is supplied for all supported platforms

optional
transportOptions: Partial<TO>

Options for the default transport that the SDK uses.

optional
tracesSampleRate: number

Sample rate to determine trace sampling.

0.0 = 0% chance of a given trace being sent (send no traces) 1.0 = 100% chance of a given trace being sent (send all traces)

Tracing is enabled if either this or tracesSampler is defined. If both are defined, tracesSampleRate is ignored.

optional
initialScope: CaptureContext

Initial data to populate scope.

optional
maxBreadcrumbs: number

The maximum number of breadcrumbs sent with events. Defaults to 100. Values over 100 will be ignored and 100 used instead.

optional
sampleRate: number

A global sample rate to apply to all events.

0.0 = 0% chance of a given event being sent (send no events) 1.0 = 100% chance of a given event being sent (send all events)

optional
maxValueLength: number

Maximum number of chars a single value can have before it will be truncated.

optional
normalizeDepth: number

Maximum number of levels that normalization algorithm will traverse in objects and arrays. Used when normalizing an event before sending, on all of the listed attributes:

  • breadcrumbs.data
  • user
  • contexts
  • extra Defaults to 3. Set to 0 to disable.
optional
normalizeMaxBreadth: number

Maximum number of properties or elements that the normalization algorithm will output in any single array or object included in the normalized event. Used when normalizing an event before sending, on all of the listed attributes:

  • breadcrumbs.data
  • user
  • contexts
  • extra Defaults to 1000
optional
shutdownTimeout: number

Controls how many milliseconds to wait before shutting down. The default is SDK-specific but typically around 2 seconds. Setting this too low can cause problems for sending events from command line applications. Setting it too high can cause the application to block for users with network connectivity problems.

optional
ignoreErrors: Array<string | RegExp>

A pattern for error messages which should not be sent to Sentry. By default, all errors will be sent.

optional
tunnel: string

A URL to an envelope tunnel endpoint. An envelope tunnel is an HTTP endpoint that accepts Sentry envelopes for forwarding. This can be used to force data through a custom server independent of the type of data.

optional
sendDefaultPii: boolean

Important: This option is currently unused and will only work in the next major version of the SDK

Controls if potentially sensitive data should be sent to Sentry by default. Note that this only applies to data that the SDK is sending by default but not data that was explicitly set (e.g. by calling Sentry.setUser()). Details about the implementation are TBD.

Defaults to false.

optional
_metadata: SdkMetadata

Set of metadata about the SDK that can be internally used to enhance envelopes and events, and provide additional data about every request.

optional
_experiments: { [key: string]: any; }

Options which are in beta, or otherwise not guaranteed to be stable.

optional
tracesSampler: (samplingContext: SamplingContext) => number | boolean

Function to compute tracing sample rate dynamically and filter unwanted traces.

Tracing is enabled if either this or tracesSampleRate is defined. If both are defined, tracesSampleRate is ignored.

Will automatically be passed a context object of default and optional custom data. See Transaction.samplingContext and Hub.startTransaction.

optional
beforeSend: (event: Event, hint: EventHint) => PromiseLike<Event | null> | Event | null

A callback invoked during event submission, allowing to optionally modify the event before it is sent to Sentry.

Note that you must return a valid event from this callback. If you do not wish to modify the event, simply return it at the end. Returning null will cause the event to be dropped.

optional
beforeBreadcrumb: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => Breadcrumb | null

A callback invoked when adding a breadcrumb, allowing to optionally modify it before adding it to future events.

Note that you must return a valid breadcrumb from this callback. If you do not wish to modify the breadcrumb, simply return it at the end. Returning null will cause the breadcrumb to be dropped.