@sentry/types

  • Version 7.104.0
  • Published
  • 311 kB
  • No dependencies
  • MIT license

Install

npm i @sentry/types
yarn add @sentry/types
pnpm add @sentry/types

Overview

Types for all Sentry JavaScript SDKs

Index

Interfaces

Enums

Type Aliases

Interfaces

interface AggregationCounts

interface AggregationCounts {}

    property crashed

    crashed?: number;

      property errored

      errored?: number;

        property exited

        exited?: number;

          property started

          started: string;

            interface AppContext

            interface AppContext extends Record<string, unknown> {}

              property app_identifier

              app_identifier?: string;

                property app_memory

                app_memory?: number;

                  property app_name

                  app_name?: string;

                    property app_start_time

                    app_start_time?: string;

                      property app_version

                      app_version?: string;

                        property build_type

                        build_type?: string;

                          interface Attachment

                          interface Attachment {}

                            property attachmentType

                            attachmentType?: string;

                              property contentType

                              contentType?: string;

                                property data

                                data: string | Uint8Array;

                                  property filename

                                  filename: string;

                                    interface BaseTransportOptions

                                    interface BaseTransportOptions extends InternalBaseTransportOptions {}

                                      property url

                                      url: string;
                                        interface Breadcrumb {}
                                        • JSDoc

                                        category?: string;
                                          data?: {
                                          [key: string]: any;
                                          };
                                            event_id?: string;
                                              level?: Severity | SeverityLevel;
                                                message?: string;
                                                  timestamp?: number;
                                                    type?: string;
                                                      interface BreadcrumbHint {}
                                                      • JSDoc

                                                      [key: string]: any;

                                                        interface Client

                                                        interface Client<O extends ClientOptions = ClientOptions> {}
                                                        • User-Facing Sentry SDK Client.

                                                          This interface contains all methods to interface with the SDK once it has been installed. It allows to send events to Sentry, record breadcrumbs and set a context included in every event. Since the SDK mutates its environment, there will only be one instance during runtime.

                                                        method addEventProcessor

                                                        addEventProcessor: (eventProcessor: EventProcessor) => void;
                                                        • Adds an event processor that applies to any event processed by this client.

                                                          TODO (v8): Make this a required method.

                                                        method addIntegration

                                                        addIntegration: (integration: Integration) => void;
                                                        • Add an integration to the client. This can be used to e.g. lazy load integrations. In most cases, this should not be necessary, and you're better off just passing the integrations via integrations: [] at initialization time. However, if you find the need to conditionally load & add an integration, you can use addIntegration to do so.

                                                          TODO (v8): Make this a required method.

                                                        method captureAggregateMetrics

                                                        captureAggregateMetrics: (metricBucketItems: Array<MetricBucketItem>) => void;
                                                        • Captures serialized metrics and sends them to Sentry.

                                                          This API is experimental and might experience breaking changes

                                                          Modifiers

                                                          • @experimental

                                                        method captureCheckIn

                                                        captureCheckIn: (
                                                        checkIn: CheckIn,
                                                        monitorConfig?: MonitorConfig,
                                                        scope?: Scope
                                                        ) => string;
                                                        • Create a cron monitor check in and send it to Sentry. This method is not available on all clients.

                                                          Parameter checkIn

                                                          An object that describes a check in.

                                                          Parameter upsertMonitorConfig

                                                          An optional object that describes a monitor config. Use this if you want to create a monitor automatically when sending a check in.

                                                          Parameter scope

                                                          An optional scope containing event metadata.

                                                          Returns

                                                          A string representing the id of the check in.

                                                        method captureEvent

                                                        captureEvent: (
                                                        event: Event,
                                                        hint?: EventHint,
                                                        scope?: Scope
                                                        ) => string | undefined;
                                                        • Captures a manually created event and sends it to Sentry.

                                                          Parameter event

                                                          The event to send to Sentry.

                                                          Parameter hint

                                                          May contain additional information about the original exception.

                                                          Parameter scope

                                                          An optional scope containing event metadata.

                                                          Returns

                                                          The event id

                                                        method captureException

                                                        captureException: (
                                                        exception: any,
                                                        hint?: EventHint,
                                                        scope?: Scope
                                                        ) => string | undefined;
                                                        • Captures an exception event and sends it to Sentry.

                                                          Parameter exception

                                                          An exception-like object.

                                                          Parameter hint

                                                          May contain additional information about the original exception.

                                                          Parameter scope

                                                          An optional scope containing event metadata.

                                                          Returns

                                                          The event id

                                                        method captureMessage

                                                        captureMessage: (
                                                        message: string,
                                                        level?: Severity | SeverityLevel,
                                                        hint?: EventHint,
                                                        scope?: Scope
                                                        ) => string | undefined;
                                                        • Captures a message event and sends it to Sentry.

                                                          Parameter message

                                                          The message to send to Sentry.

                                                          Parameter level

                                                          Define the level of the message.

                                                          Parameter hint

                                                          May contain additional information about the original exception.

                                                          Parameter scope

                                                          An optional scope containing event metadata.

                                                          Returns

                                                          The event id

                                                        method captureSession

                                                        captureSession: (session: Session) => void;
                                                        • Captures a session

                                                          Parameter session

                                                          Session to be delivered

                                                        method close

                                                        close: (timeout?: number) => PromiseLike<boolean>;
                                                        • Flush the event queue and set the client to enabled = false. See Client.flush.

                                                          Parameter timeout

                                                          Maximum time in ms the client should wait before shutting down. Omitting this parameter will cause the client to wait until all events are sent before disabling itself.

                                                          Returns

                                                          A promise which resolves to true if the flush completes successfully before the timeout, or false if it doesn't.

                                                        method emit

                                                        emit: {
                                                        (hook: 'startTransaction', transaction: Transaction): void;
                                                        (hook: 'finishTransaction', transaction: Transaction): void;
                                                        (hook: 'beforeEnvelope', envelope: Envelope): void;
                                                        (hook: 'beforeSendEvent', event: Event, hint?: EventHint): void;
                                                        (hook: 'preprocessEvent', event: Event, hint?: EventHint): void;
                                                        (
                                                        hook: 'afterSendEvent',
                                                        event: Event,
                                                        sendResponse: void | TransportMakeRequestResponse
                                                        ): void;
                                                        (
                                                        hook: 'beforeAddBreadcrumb',
                                                        breadcrumb: Breadcrumb,
                                                        hint?: BreadcrumbHint
                                                        ): void;
                                                        (hook: 'createDsc', dsc: DynamicSamplingContext): void;
                                                        (
                                                        hook: 'otelSpanEnd',
                                                        otelSpan: unknown,
                                                        mutableOptions: { drop: boolean }
                                                        ): void;
                                                        (
                                                        hook: 'beforeSendFeedback',
                                                        feedback: FeedbackEvent,
                                                        options?: { includeReplay?: boolean }
                                                        ): void;
                                                        (hook: 'startPageLoadSpan', options: StartSpanOptions): void;
                                                        (hook: 'startNavigationSpan', options: StartSpanOptions): void;
                                                        };
                                                        • Fire a hook event for transaction start. Expects to be given a transaction as the second argument.

                                                        • Fire a hook event for transaction finish. Expects to be given a transaction as the second argument.

                                                        • Fire a hook event before sending an event. This is called right before an event is sent and should not be used to mutate the event. Expects to be given an Event & EventHint as the second/third argument.

                                                        • Fire a hook event to process events before they are passed to (global) event processors. Expects to be given an Event & EventHint as the second/third argument.

                                                        • Fire a hook for when a breadcrumb is added. Expects the breadcrumb as second argument.

                                                        • Fire a hook for when a DSC (Dynamic Sampling Context) is created. Expects the DSC as second argument.

                                                        • Fire a hook for when an OpenTelemetry span is ended (in @sentry/opentelemetry-node). Expects the OTEL span & as second argument, and an option object as third argument. The option argument may be mutated to drop the span.

                                                        • Fire a hook event for after preparing a feedback event. Events to be given a feedback event as the second argument, and an optional options object as third argument.

                                                        • Emit a hook event for BrowserTracing to trigger a span start for a page load.

                                                        • Emit a hook event for BrowserTracing to trigger a span for a navigation.

                                                        method eventFromException

                                                        eventFromException: (exception: any, hint?: EventHint) => PromiseLike<Event>;
                                                        • Creates an Event from all inputs to captureException and non-primitive inputs to captureMessage.

                                                        method eventFromMessage

                                                        eventFromMessage: (
                                                        message: ParameterizedString,
                                                        level?: Severity | SeverityLevel,
                                                        hint?: EventHint
                                                        ) => PromiseLike<Event>;
                                                        • Creates an Event from primitive inputs to captureMessage.

                                                        method flush

                                                        flush: (timeout?: number) => PromiseLike<boolean>;
                                                        • Wait for all events to be sent or the timeout to expire, whichever comes first.

                                                          Parameter timeout

                                                          Maximum time in ms the client should wait for events to be flushed. Omitting this parameter will cause the client to wait until all events are sent before resolving the promise.

                                                          Returns

                                                          A promise that will resolve with true if all events are sent before the timeout, or false if there are still events in the queue when the timeout is reached.

                                                        method getDsn

                                                        getDsn: () => DsnComponents | undefined;
                                                        • Returns the current Dsn.

                                                        method getEventProcessors

                                                        getEventProcessors: () => EventProcessor[];
                                                        • Get all added event processors for this client.

                                                          TODO (v8): Make this a required method.

                                                        method getIntegration

                                                        getIntegration: <T extends Integration>(
                                                        integration: IntegrationClass<T>
                                                        ) => T | null;
                                                        • Returns the client's instance of the given integration class, it any.

                                                          Deprecated

                                                          Use getIntegrationByName() instead.

                                                        method getIntegrationByName

                                                        getIntegrationByName: <T extends Integration = Integration>(
                                                        name: string
                                                        ) => T | undefined;
                                                        • Get the instance of the integration with the given name on the client, if it was added.

                                                        method getOptions

                                                        getOptions: () => O;
                                                        • Returns the current options.

                                                        method getSdkMetadata

                                                        getSdkMetadata: () => SdkMetadata | undefined;
                                                        • TODO (v8): Make this a required method.

                                                        method getTransport

                                                        getTransport: () => Transport | undefined;
                                                        • Returns the transport that is used by the client. Please note that the transport gets lazy initialized so it will only be there once the first event has been sent.

                                                          Returns

                                                          The transport.

                                                        method init

                                                        init: () => void;
                                                        • Initialize this client. Call this after the client was set on a scope.

                                                        method on

                                                        on: {
                                                        (
                                                        hook: 'startTransaction',
                                                        callback: (transaction: Transaction) => void
                                                        ): void;
                                                        (
                                                        hook: 'finishTransaction',
                                                        callback: (transaction: Transaction) => void
                                                        ): void;
                                                        (hook: 'beforeEnvelope', callback: (envelope: Envelope) => void): void;
                                                        (
                                                        hook: 'beforeSendEvent',
                                                        callback: (event: Event, hint?: EventHint) => void
                                                        ): void;
                                                        (
                                                        hook: 'preprocessEvent',
                                                        callback: (event: Event, hint?: EventHint) => void
                                                        ): void;
                                                        (
                                                        hook: 'afterSendEvent',
                                                        callback: (
                                                        event: Event,
                                                        sendResponse: void | TransportMakeRequestResponse
                                                        ) => void
                                                        ): void;
                                                        (
                                                        hook: 'beforeAddBreadcrumb',
                                                        callback: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void
                                                        ): void;
                                                        (hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;
                                                        (
                                                        hook: 'otelSpanEnd',
                                                        callback: (otelSpan: unknown, mutableOptions: { drop: boolean }) => void
                                                        ): void;
                                                        (
                                                        hook: 'beforeSendFeedback',
                                                        callback: (
                                                        feedback: FeedbackEvent,
                                                        options?: { includeReplay?: boolean }
                                                        ) => void
                                                        ): void;
                                                        (
                                                        hook: 'startPageLoadSpan',
                                                        callback: (options: StartSpanOptions) => void
                                                        ): void;
                                                        (
                                                        hook: 'startNavigationSpan',
                                                        callback: (options: StartSpanOptions) => void
                                                        ): void;
                                                        };
                                                        • Register a callback for transaction start. Receives the transaction as argument.

                                                        • Register a callback for transaction finish. Receives the transaction as argument.

                                                        • Register a callback for transaction start and finish.

                                                        • Register a callback for before sending an event. This is called right before an event is sent and should not be used to mutate the event. Receives an Event & EventHint as arguments.

                                                        • Register a callback for preprocessing an event, before it is passed to (global) event processors. Receives an Event & EventHint as arguments.

                                                        • Register a callback for when an event has been sent.

                                                        • Register a callback before a breadcrumb is added.

                                                        • Register a callback when a DSC (Dynamic Sampling Context) is created.

                                                        • Register a callback when an OpenTelemetry span is ended (in @sentry/opentelemetry-node). The option argument may be mutated to drop the span.

                                                        • Register a callback when a Feedback event has been prepared. This should be used to mutate the event. The options argument can hint about what kind of mutation it expects.

                                                        • A hook for BrowserTracing to trigger a span start for a page load.

                                                        • A hook for BrowserTracing to trigger a span for a navigation.

                                                        method recordDroppedEvent

                                                        recordDroppedEvent: (
                                                        reason: EventDropReason,
                                                        dataCategory: DataCategory,
                                                        event?: Event
                                                        ) => void;
                                                        • Record on the client that an event got dropped (ie, an event that will not be sent to sentry).

                                                          Parameter reason

                                                          The reason why the event got dropped.

                                                          Parameter category

                                                          The data category of the dropped event.

                                                          Parameter event

                                                          The dropped event.

                                                        method sendEvent

                                                        sendEvent: (event: Event, hint?: EventHint) => void;
                                                        • Submits the event to Sentry

                                                        method sendSession

                                                        sendSession: (session: Session | SessionAggregates) => void;
                                                        • Submits the session to Sentry

                                                        method setupIntegrations

                                                        setupIntegrations: (forceInitialize?: boolean) => void;
                                                        • This is an internal function to setup all integrations that should run on the client.

                                                          Deprecated

                                                          Use client.init() instead.

                                                        interface ClientOptions

                                                        interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOptions> {}

                                                          property allowUrls

                                                          allowUrls?: Array<string | RegExp>;
                                                          • A pattern for error URLs which should exclusively be sent to Sentry. This is the opposite of Options.denyUrls. By default, all errors will be sent.

                                                            Requires the use of the InboundFilters integration.

                                                          property attachStacktrace

                                                          attachStacktrace?: boolean;
                                                          • Attaches stacktraces to pure capture message / log integrations

                                                          property autoSessionTracking

                                                          autoSessionTracking?: boolean;
                                                          • A flag enabling Sessions Tracking feature. By default, Sessions Tracking is enabled.

                                                          property beforeBreadcrumb

                                                          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.

                                                            Parameter breadcrumb

                                                            The breadcrumb as created by the SDK.

                                                            Returns

                                                            The breadcrumb that will be added | null.

                                                          property beforeSend

                                                          beforeSend?: (
                                                          event: ErrorEvent,
                                                          hint: EventHint
                                                          ) => PromiseLike<Event | null> | Event | null;
                                                          • An event-processing callback for error and message events, guaranteed to be invoked after all other event processors, which allows an event to be modified or dropped.

                                                            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.

                                                            Parameter event

                                                            The error or message event generated by the SDK.

                                                            Parameter hint

                                                            Event metadata useful for processing.

                                                            Returns

                                                            A new event that will be sent | null.

                                                          property beforeSendTransaction

                                                          beforeSendTransaction?: (
                                                          event: TransactionEvent,
                                                          hint: EventHint
                                                          ) => PromiseLike<Event | null> | Event | null;
                                                          • An event-processing callback for transaction events, guaranteed to be invoked after all other event processors. This allows an event to be modified or dropped before it's sent.

                                                            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.

                                                            Parameter event

                                                            The error or message event generated by the SDK.

                                                            Parameter hint

                                                            Event metadata useful for processing.

                                                            Returns

                                                            A new event that will be sent | null.

                                                          property debug

                                                          debug?: boolean;
                                                          • Enable debug functionality in the SDK itself

                                                          property denyUrls

                                                          denyUrls?: Array<string | RegExp>;
                                                          • A pattern for error URLs which should not be sent to Sentry. To allow certain errors instead, use Options.allowUrls. By default, all errors will be sent.

                                                            Requires the use of the InboundFilters integration.

                                                          property dist

                                                          dist?: string;
                                                          • Sets the distribution for all events

                                                          property dsn

                                                          dsn?: string;
                                                          • The Dsn used to connect to Sentry and identify the project. If omitted, the SDK will not send any data to Sentry.

                                                          property enabled

                                                          enabled?: boolean;
                                                          • Specifies whether this SDK should send events to Sentry. Defaults to true.

                                                          property enableTracing

                                                          enableTracing?: boolean;
                                                          • If this is enabled, transactions and trace data will be generated and captured. This will set the tracesSampleRate to the recommended default of 1.0 if tracesSampleRate is undefined. Note that tracesSampleRate and tracesSampler take precedence over this option.

                                                          property environment

                                                          environment?: string;
                                                          • The current environment of your application (e.g. "production").

                                                          property ignoreErrors

                                                          ignoreErrors?: Array<string | RegExp>;
                                                          • A pattern for error messages which should not be sent to Sentry. By default, all errors will be sent.

                                                          property ignoreTransactions

                                                          ignoreTransactions?: Array<string | RegExp>;
                                                          • A pattern for transaction names which should not be sent to Sentry. By default, all transactions will be sent.

                                                          property initialScope

                                                          initialScope?: CaptureContext;
                                                          • Initial data to populate scope.

                                                          property instrumenter

                                                          instrumenter?: Instrumenter;
                                                          • The instrumenter to use. Defaults to sentry. When not set to sentry, auto-instrumentation inside of Sentry will be disabled, in favor of using external auto instrumentation.

                                                            NOTE: Any option except for sentry is highly experimental and subject to change!

                                                          property integrations

                                                          integrations: Integration[];
                                                          • List of integrations that should be installed after SDK was initialized.

                                                          property maxBreadcrumbs

                                                          maxBreadcrumbs?: number;
                                                          • The maximum number of breadcrumbs sent with events. Defaults to 100. Sentry has a maximum payload size of 1MB and any events exceeding that payload size will be dropped.

                                                          property maxValueLength

                                                          maxValueLength?: number;
                                                          • Maximum number of chars a single value can have before it will be truncated.

                                                          property normalizeDepth

                                                          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.

                                                          property normalizeMaxBreadth

                                                          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

                                                          property release

                                                          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.

                                                          property sampleRate

                                                          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)

                                                          property sendClientReports

                                                          sendClientReports?: boolean;
                                                          • Send SDK Client Reports. By default, Client Reports are enabled.

                                                          property sendDefaultPii

                                                          sendDefaultPii?: boolean;
                                                          • 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()).

                                                            Defaults to false.

                                                            NOTE: This option currently controls only a few data points in a selected set of SDKs. The goal for this option is to eventually control all sensitive data the SDK sets by default. However, this would be a breaking change so until the next major update this option only controls data points which were added in versions above 7.9.0.

                                                          property shutdownTimeout

                                                          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.

                                                          property stackParser

                                                          stackParser: StackParser;
                                                          • A stack parser implementation By default, a stack parser is supplied for all supported platforms

                                                          property tracePropagationTargets

                                                          tracePropagationTargets?: TracePropagationTargets;
                                                          • List of strings/regex controlling to which outgoing requests the SDK will attach tracing headers.

                                                            By default the SDK will attach those headers to all requests to localhost and same origin. If this option is provided, the SDK will match the request URL of outgoing requests against the items in this array, and only attach tracing headers if a match was found.

                                                            Example 1

                                                            Sentry.init({
                                                            tracePropagationTargets: ['api.site.com'],
                                                            });

                                                            Default: ['localhost', /^//]

                                                          property tracesSampler

                                                          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.

                                                            Returns

                                                            A sample rate between 0 and 1 (0 drops the trace, 1 guarantees it will be sent). Returning true is equivalent to returning 1 and returning false is equivalent to returning 0.

                                                          property tracesSampleRate

                                                          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.

                                                          property transport

                                                          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.

                                                          property transportOptions

                                                          transportOptions?: Partial<TO>;
                                                          • Options for the default transport that the SDK uses.

                                                          property tunnel

                                                          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.

                                                          interface CloudResourceContext

                                                          interface CloudResourceContext extends Record<string, unknown> {}

                                                            property ['cloud.account.id']

                                                            ['cloud.account.id']?: string;

                                                              property ['cloud.availability_zone']

                                                              ['cloud.availability_zone']?: string;

                                                                property ['cloud.platform']

                                                                ['cloud.platform']?: string;

                                                                  property ['cloud.provider']

                                                                  ['cloud.provider']?: string;

                                                                    property ['cloud.region']

                                                                    ['cloud.region']?: string;

                                                                      property ['host.id']

                                                                      ['host.id']?: string;

                                                                        property ['host.type']

                                                                        ['host.type']?: string;

                                                                          interface Contexts

                                                                          interface Contexts extends Record<string, Context | undefined> {}

                                                                            property app

                                                                            app?: AppContext;

                                                                              property cloud_resource

                                                                              cloud_resource?: CloudResourceContext;

                                                                                property culture

                                                                                culture?: CultureContext;

                                                                                  property device

                                                                                  device?: DeviceContext;

                                                                                    property os

                                                                                    os?: OsContext;

                                                                                      property response

                                                                                      response?: ResponseContext;

                                                                                        property state

                                                                                        state?: StateContext;

                                                                                          property trace

                                                                                          trace?: TraceContext;

                                                                                            interface CultureContext

                                                                                            interface CultureContext extends Record<string, unknown> {}

                                                                                              property calendar

                                                                                              calendar?: string;

                                                                                                property display_name

                                                                                                display_name?: string;

                                                                                                  property is_24_hour_format

                                                                                                  is_24_hour_format?: boolean;

                                                                                                    property locale

                                                                                                    locale?: string;

                                                                                                      property timezone

                                                                                                      timezone?: string;

                                                                                                        interface CustomSamplingContext

                                                                                                        interface CustomSamplingContext {}
                                                                                                        • Context data passed by the user when starting a transaction, to be used by the tracesSampler method.

                                                                                                        index signature

                                                                                                        [key: string]: any;

                                                                                                          interface DebugMeta

                                                                                                          interface DebugMeta {}
                                                                                                          • Holds meta information to customize the behavior of Sentry's server-side event processing.

                                                                                                          property images

                                                                                                          images?: Array<DebugImage>;

                                                                                                            interface DeviceContext

                                                                                                            interface DeviceContext extends Record<string, unknown> {}

                                                                                                              property arch

                                                                                                              arch?: string;

                                                                                                                property battery_level

                                                                                                                battery_level?: number;

                                                                                                                  property battery_status

                                                                                                                  battery_status?: string;

                                                                                                                    property boot_time

                                                                                                                    boot_time?: string;

                                                                                                                      property brand

                                                                                                                      brand?: string;

                                                                                                                        property charging

                                                                                                                        charging?: boolean;

                                                                                                                          property cpu_description

                                                                                                                          cpu_description?: string;

                                                                                                                            property device_type

                                                                                                                            device_type?: string;

                                                                                                                              property device_unique_identifier

                                                                                                                              device_unique_identifier?: string;

                                                                                                                                property external_free_storage

                                                                                                                                external_free_storage?: number;

                                                                                                                                  property external_storage_size

                                                                                                                                  external_storage_size?: number;

                                                                                                                                    property family

                                                                                                                                    family?: string;

                                                                                                                                      property free_memory

                                                                                                                                      free_memory?: number;

                                                                                                                                        property free_storage

                                                                                                                                        free_storage?: number;

                                                                                                                                          property low_memory

                                                                                                                                          low_memory?: boolean;

                                                                                                                                            property manufacturer

                                                                                                                                            manufacturer?: string;

                                                                                                                                              property memory_size

                                                                                                                                              memory_size?: number;

                                                                                                                                                property model

                                                                                                                                                model?: string;

                                                                                                                                                  property model_id

                                                                                                                                                  model_id?: string;

                                                                                                                                                    property name

                                                                                                                                                    name?: string;

                                                                                                                                                      property online

                                                                                                                                                      online?: boolean;

                                                                                                                                                        property orientation

                                                                                                                                                        orientation?: 'portrait' | 'landscape';

                                                                                                                                                          property processor_count

                                                                                                                                                          processor_count?: number;

                                                                                                                                                            property processor_frequency

                                                                                                                                                            processor_frequency?: number;

                                                                                                                                                              property screen_density

                                                                                                                                                              screen_density?: number;

                                                                                                                                                                property screen_dpi

                                                                                                                                                                screen_dpi?: number;

                                                                                                                                                                  property screen_height_pixels

                                                                                                                                                                  screen_height_pixels?: number;

                                                                                                                                                                    property screen_resolution

                                                                                                                                                                    screen_resolution?: string;

                                                                                                                                                                      property screen_width_pixels

                                                                                                                                                                      screen_width_pixels?: number;

                                                                                                                                                                        property simulator

                                                                                                                                                                        simulator?: boolean;

                                                                                                                                                                          property storage_size

                                                                                                                                                                          storage_size?: number;

                                                                                                                                                                            property supports_accelerometer

                                                                                                                                                                            supports_accelerometer?: boolean;

                                                                                                                                                                              property supports_audio

                                                                                                                                                                              supports_audio?: boolean;

                                                                                                                                                                                property supports_gyroscope

                                                                                                                                                                                supports_gyroscope?: boolean;

                                                                                                                                                                                  property supports_location_service

                                                                                                                                                                                  supports_location_service?: boolean;

                                                                                                                                                                                    property supports_vibration

                                                                                                                                                                                    supports_vibration?: boolean;

                                                                                                                                                                                      property usable_memory

                                                                                                                                                                                      usable_memory?: number;

                                                                                                                                                                                        interface DsnComponents

                                                                                                                                                                                        interface DsnComponents {}
                                                                                                                                                                                        • Primitive components of a Dsn.

                                                                                                                                                                                        property host

                                                                                                                                                                                        host: string;
                                                                                                                                                                                        • Hostname of the Sentry instance.

                                                                                                                                                                                        property pass

                                                                                                                                                                                        pass?: string;
                                                                                                                                                                                        • Private authorization key (deprecated, optional).

                                                                                                                                                                                        property path

                                                                                                                                                                                        path?: string;
                                                                                                                                                                                        • Sub path/

                                                                                                                                                                                        property port

                                                                                                                                                                                        port?: string;
                                                                                                                                                                                        • Port of the Sentry instance.

                                                                                                                                                                                        property projectId

                                                                                                                                                                                        projectId: string;
                                                                                                                                                                                        • Project ID

                                                                                                                                                                                        property protocol

                                                                                                                                                                                        protocol: DsnProtocol;
                                                                                                                                                                                        • Protocol used to connect to Sentry.

                                                                                                                                                                                        property publicKey

                                                                                                                                                                                        publicKey?: string;
                                                                                                                                                                                        • Public authorization key.

                                                                                                                                                                                        interface ErrorEvent

                                                                                                                                                                                        interface ErrorEvent extends Event {}

                                                                                                                                                                                          property type

                                                                                                                                                                                          type: undefined;

                                                                                                                                                                                            interface Event

                                                                                                                                                                                            interface Event {}
                                                                                                                                                                                            • JSDoc

                                                                                                                                                                                            property breadcrumbs

                                                                                                                                                                                            breadcrumbs?: Breadcrumb[];

                                                                                                                                                                                              property contexts

                                                                                                                                                                                              contexts?: Contexts;

                                                                                                                                                                                                property debug_meta

                                                                                                                                                                                                debug_meta?: DebugMeta;

                                                                                                                                                                                                  property dist

                                                                                                                                                                                                  dist?: string;

                                                                                                                                                                                                    property environment

                                                                                                                                                                                                    environment?: string;

                                                                                                                                                                                                      property event_id

                                                                                                                                                                                                      event_id?: string;

                                                                                                                                                                                                        property exception

                                                                                                                                                                                                        exception?: {
                                                                                                                                                                                                        values?: Exception[];
                                                                                                                                                                                                        };

                                                                                                                                                                                                          property extra

                                                                                                                                                                                                          extra?: Extras;

                                                                                                                                                                                                            property fingerprint

                                                                                                                                                                                                            fingerprint?: string[];

                                                                                                                                                                                                              property level

                                                                                                                                                                                                              level?: Severity | SeverityLevel;

                                                                                                                                                                                                                property logentry

                                                                                                                                                                                                                logentry?: {
                                                                                                                                                                                                                message?: string;
                                                                                                                                                                                                                params?: string[];
                                                                                                                                                                                                                };

                                                                                                                                                                                                                  property logger

                                                                                                                                                                                                                  logger?: string;

                                                                                                                                                                                                                    property measurements

                                                                                                                                                                                                                    measurements?: Measurements;

                                                                                                                                                                                                                      property message

                                                                                                                                                                                                                      message?: string;

                                                                                                                                                                                                                        property modules

                                                                                                                                                                                                                        modules?: {
                                                                                                                                                                                                                        [key: string]: string;
                                                                                                                                                                                                                        };

                                                                                                                                                                                                                          property platform

                                                                                                                                                                                                                          platform?: string;

                                                                                                                                                                                                                            property release

                                                                                                                                                                                                                            release?: string;

                                                                                                                                                                                                                              property request

                                                                                                                                                                                                                              request?: Request;

                                                                                                                                                                                                                                property sdk

                                                                                                                                                                                                                                sdk?: SdkInfo;

                                                                                                                                                                                                                                  property sdkProcessingMetadata

                                                                                                                                                                                                                                  sdkProcessingMetadata?: {
                                                                                                                                                                                                                                  [key: string]: any;
                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                    property server_name

                                                                                                                                                                                                                                    server_name?: string;

                                                                                                                                                                                                                                      property spans

                                                                                                                                                                                                                                      spans?: Span[];

                                                                                                                                                                                                                                        property start_timestamp

                                                                                                                                                                                                                                        start_timestamp?: number;

                                                                                                                                                                                                                                          property tags

                                                                                                                                                                                                                                          tags?: {
                                                                                                                                                                                                                                          [key: string]: Primitive;
                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                            property threads

                                                                                                                                                                                                                                            threads?: {
                                                                                                                                                                                                                                            values: Thread[];
                                                                                                                                                                                                                                            };

                                                                                                                                                                                                                                              property timestamp

                                                                                                                                                                                                                                              timestamp?: number;

                                                                                                                                                                                                                                                property transaction

                                                                                                                                                                                                                                                transaction?: string;

                                                                                                                                                                                                                                                  property transaction_info

                                                                                                                                                                                                                                                  transaction_info?: {
                                                                                                                                                                                                                                                  source: TransactionSource;
                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                    property type

                                                                                                                                                                                                                                                    type?: EventType;

                                                                                                                                                                                                                                                      property user

                                                                                                                                                                                                                                                      user?: User;

                                                                                                                                                                                                                                                        interface EventHint

                                                                                                                                                                                                                                                        interface EventHint {}
                                                                                                                                                                                                                                                        • JSDoc

                                                                                                                                                                                                                                                        property attachments

                                                                                                                                                                                                                                                        attachments?: Attachment[];

                                                                                                                                                                                                                                                          property captureContext

                                                                                                                                                                                                                                                          captureContext?: CaptureContext;

                                                                                                                                                                                                                                                            property data

                                                                                                                                                                                                                                                            data?: any;

                                                                                                                                                                                                                                                              property event_id

                                                                                                                                                                                                                                                              event_id?: string;

                                                                                                                                                                                                                                                                property integrations

                                                                                                                                                                                                                                                                integrations?: string[];

                                                                                                                                                                                                                                                                  property mechanism

                                                                                                                                                                                                                                                                  mechanism?: Partial<Mechanism>;

                                                                                                                                                                                                                                                                    property originalException

                                                                                                                                                                                                                                                                    originalException?: unknown;

                                                                                                                                                                                                                                                                      property syntheticException

                                                                                                                                                                                                                                                                      syntheticException?: Error | null;

                                                                                                                                                                                                                                                                        interface EventProcessor

                                                                                                                                                                                                                                                                        interface EventProcessor {}
                                                                                                                                                                                                                                                                        • Event processors are used to change the event before it will be send. We strongly advise to make this function sync. Returning a PromiseLike<Event | null> will work just fine, but better be sure that you know what you are doing. Event processing will be deferred until your Promise is resolved.

                                                                                                                                                                                                                                                                        property id

                                                                                                                                                                                                                                                                        id?: string;

                                                                                                                                                                                                                                                                          call signature

                                                                                                                                                                                                                                                                          (event: Event, hint: EventHint): PromiseLike<Event | null> | Event | null;

                                                                                                                                                                                                                                                                            interface Exception

                                                                                                                                                                                                                                                                            interface Exception {}
                                                                                                                                                                                                                                                                            • JSDoc

                                                                                                                                                                                                                                                                            property mechanism

                                                                                                                                                                                                                                                                            mechanism?: Mechanism;

                                                                                                                                                                                                                                                                              property module

                                                                                                                                                                                                                                                                              module?: string;

                                                                                                                                                                                                                                                                                property stacktrace

                                                                                                                                                                                                                                                                                stacktrace?: Stacktrace;

                                                                                                                                                                                                                                                                                  property thread_id

                                                                                                                                                                                                                                                                                  thread_id?: number;

                                                                                                                                                                                                                                                                                    property type

                                                                                                                                                                                                                                                                                    type?: string;

                                                                                                                                                                                                                                                                                      property value

                                                                                                                                                                                                                                                                                      value?: string;

                                                                                                                                                                                                                                                                                        interface ExtendedError

                                                                                                                                                                                                                                                                                        interface ExtendedError extends Error {}
                                                                                                                                                                                                                                                                                        • Just an Error object with arbitrary attributes attached to it.

                                                                                                                                                                                                                                                                                        index signature

                                                                                                                                                                                                                                                                                        [key: string]: any;

                                                                                                                                                                                                                                                                                          interface ExtractedNodeRequestData

                                                                                                                                                                                                                                                                                          interface ExtractedNodeRequestData {}
                                                                                                                                                                                                                                                                                          • Data extracted from an incoming request to a node server

                                                                                                                                                                                                                                                                                          property cookies

                                                                                                                                                                                                                                                                                          cookies?: {
                                                                                                                                                                                                                                                                                          [key: string]: string;
                                                                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                                                                          • String representing the cookies sent along with the request

                                                                                                                                                                                                                                                                                          property data

                                                                                                                                                                                                                                                                                          data?: string;
                                                                                                                                                                                                                                                                                          • Any data sent in the request's body, as a JSON string

                                                                                                                                                                                                                                                                                          property headers

                                                                                                                                                                                                                                                                                          headers?: {
                                                                                                                                                                                                                                                                                          [key: string]: string;
                                                                                                                                                                                                                                                                                          };
                                                                                                                                                                                                                                                                                          • Specific headers from the request

                                                                                                                                                                                                                                                                                          property method

                                                                                                                                                                                                                                                                                          method?: string;
                                                                                                                                                                                                                                                                                          • The request's method

                                                                                                                                                                                                                                                                                          property query_string

                                                                                                                                                                                                                                                                                          query_string?: QueryParams;
                                                                                                                                                                                                                                                                                          • The request's query params

                                                                                                                                                                                                                                                                                          property url

                                                                                                                                                                                                                                                                                          url?: string;
                                                                                                                                                                                                                                                                                          • The request's URL, including query string

                                                                                                                                                                                                                                                                                          index signature

                                                                                                                                                                                                                                                                                          [key: string]: any;

                                                                                                                                                                                                                                                                                            interface FeedbackEvent

                                                                                                                                                                                                                                                                                            interface FeedbackEvent extends Event {}
                                                                                                                                                                                                                                                                                            • NOTE: These types are still considered Alpha and subject to change.

                                                                                                                                                                                                                                                                                            property contexts

                                                                                                                                                                                                                                                                                            contexts: Event['contexts'] & {
                                                                                                                                                                                                                                                                                            feedback: FeedbackContext;
                                                                                                                                                                                                                                                                                            };

                                                                                                                                                                                                                                                                                              property type

                                                                                                                                                                                                                                                                                              type: 'feedback';

                                                                                                                                                                                                                                                                                                interface FetchBreadcrumbData

                                                                                                                                                                                                                                                                                                interface FetchBreadcrumbData {}

                                                                                                                                                                                                                                                                                                  property method

                                                                                                                                                                                                                                                                                                  method: string;

                                                                                                                                                                                                                                                                                                    property request_body_size

                                                                                                                                                                                                                                                                                                    request_body_size?: number;

                                                                                                                                                                                                                                                                                                      property response_body_size

                                                                                                                                                                                                                                                                                                      response_body_size?: number;

                                                                                                                                                                                                                                                                                                        property status_code

                                                                                                                                                                                                                                                                                                        status_code?: number;

                                                                                                                                                                                                                                                                                                          property url

                                                                                                                                                                                                                                                                                                          url: string;

                                                                                                                                                                                                                                                                                                            interface FetchBreadcrumbHint

                                                                                                                                                                                                                                                                                                            interface FetchBreadcrumbHint {}

                                                                                                                                                                                                                                                                                                              property data

                                                                                                                                                                                                                                                                                                              data?: unknown;

                                                                                                                                                                                                                                                                                                                property endTimestamp

                                                                                                                                                                                                                                                                                                                endTimestamp: number;

                                                                                                                                                                                                                                                                                                                  property input

                                                                                                                                                                                                                                                                                                                  input: any[];

                                                                                                                                                                                                                                                                                                                    property response

                                                                                                                                                                                                                                                                                                                    response?: unknown;

                                                                                                                                                                                                                                                                                                                      property startTimestamp

                                                                                                                                                                                                                                                                                                                      startTimestamp: number;

                                                                                                                                                                                                                                                                                                                        interface FinishedCheckIn

                                                                                                                                                                                                                                                                                                                        interface FinishedCheckIn {}

                                                                                                                                                                                                                                                                                                                          property checkInId

                                                                                                                                                                                                                                                                                                                          checkInId: SerializedCheckIn['check_in_id'];

                                                                                                                                                                                                                                                                                                                            property duration

                                                                                                                                                                                                                                                                                                                            duration?: SerializedCheckIn['duration'];

                                                                                                                                                                                                                                                                                                                              property monitorSlug

                                                                                                                                                                                                                                                                                                                              monitorSlug: SerializedCheckIn['monitor_slug'];

                                                                                                                                                                                                                                                                                                                                property status

                                                                                                                                                                                                                                                                                                                                status: 'ok' | 'error';

                                                                                                                                                                                                                                                                                                                                  interface HandlerDataConsole

                                                                                                                                                                                                                                                                                                                                  interface HandlerDataConsole {}

                                                                                                                                                                                                                                                                                                                                    property args

                                                                                                                                                                                                                                                                                                                                    args: any[];

                                                                                                                                                                                                                                                                                                                                      property level

                                                                                                                                                                                                                                                                                                                                      level: ConsoleLevel;

                                                                                                                                                                                                                                                                                                                                        interface HandlerDataDom

                                                                                                                                                                                                                                                                                                                                        interface HandlerDataDom {}

                                                                                                                                                                                                                                                                                                                                          property event

                                                                                                                                                                                                                                                                                                                                          event:
                                                                                                                                                                                                                                                                                                                                          | object
                                                                                                                                                                                                                                                                                                                                          | {
                                                                                                                                                                                                                                                                                                                                          target: object;
                                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                                            property global

                                                                                                                                                                                                                                                                                                                                            global?: boolean;

                                                                                                                                                                                                                                                                                                                                              property name

                                                                                                                                                                                                                                                                                                                                              name: string;

                                                                                                                                                                                                                                                                                                                                                interface HandlerDataError

                                                                                                                                                                                                                                                                                                                                                interface HandlerDataError {}

                                                                                                                                                                                                                                                                                                                                                  property column

                                                                                                                                                                                                                                                                                                                                                  column?: number;

                                                                                                                                                                                                                                                                                                                                                    property error

                                                                                                                                                                                                                                                                                                                                                    error?: Error;

                                                                                                                                                                                                                                                                                                                                                      property line

                                                                                                                                                                                                                                                                                                                                                      line?: number;

                                                                                                                                                                                                                                                                                                                                                        property msg

                                                                                                                                                                                                                                                                                                                                                        msg: string | object;

                                                                                                                                                                                                                                                                                                                                                          property url

                                                                                                                                                                                                                                                                                                                                                          url?: string;

                                                                                                                                                                                                                                                                                                                                                            interface HandlerDataFetch

                                                                                                                                                                                                                                                                                                                                                            interface HandlerDataFetch {}

                                                                                                                                                                                                                                                                                                                                                              property args

                                                                                                                                                                                                                                                                                                                                                              args: any[];

                                                                                                                                                                                                                                                                                                                                                                property endTimestamp

                                                                                                                                                                                                                                                                                                                                                                endTimestamp?: number;

                                                                                                                                                                                                                                                                                                                                                                  property error

                                                                                                                                                                                                                                                                                                                                                                  error?: unknown;

                                                                                                                                                                                                                                                                                                                                                                    property fetchData

                                                                                                                                                                                                                                                                                                                                                                    fetchData: SentryFetchData;

                                                                                                                                                                                                                                                                                                                                                                      property response

                                                                                                                                                                                                                                                                                                                                                                      response?: {
                                                                                                                                                                                                                                                                                                                                                                      readonly ok: boolean;
                                                                                                                                                                                                                                                                                                                                                                      readonly status: number;
                                                                                                                                                                                                                                                                                                                                                                      readonly url: string;
                                                                                                                                                                                                                                                                                                                                                                      headers: WebFetchHeaders;
                                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                                        property startTimestamp

                                                                                                                                                                                                                                                                                                                                                                        startTimestamp: number;

                                                                                                                                                                                                                                                                                                                                                                          interface HandlerDataHistory

                                                                                                                                                                                                                                                                                                                                                                          interface HandlerDataHistory {}

                                                                                                                                                                                                                                                                                                                                                                            property from

                                                                                                                                                                                                                                                                                                                                                                            from: string | undefined;

                                                                                                                                                                                                                                                                                                                                                                              property to

                                                                                                                                                                                                                                                                                                                                                                              to: string;

                                                                                                                                                                                                                                                                                                                                                                                interface HandlerDataXhr

                                                                                                                                                                                                                                                                                                                                                                                interface HandlerDataXhr {}

                                                                                                                                                                                                                                                                                                                                                                                  property args

                                                                                                                                                                                                                                                                                                                                                                                  args: [string, string];
                                                                                                                                                                                                                                                                                                                                                                                  • Deprecated

                                                                                                                                                                                                                                                                                                                                                                                    This property will be removed in v8.

                                                                                                                                                                                                                                                                                                                                                                                  property endTimestamp

                                                                                                                                                                                                                                                                                                                                                                                  endTimestamp?: number;

                                                                                                                                                                                                                                                                                                                                                                                    property startTimestamp

                                                                                                                                                                                                                                                                                                                                                                                    startTimestamp?: number;

                                                                                                                                                                                                                                                                                                                                                                                      property xhr

                                                                                                                                                                                                                                                                                                                                                                                      xhr: SentryWrappedXMLHttpRequest;

                                                                                                                                                                                                                                                                                                                                                                                        interface Hub

                                                                                                                                                                                                                                                                                                                                                                                        interface Hub {}
                                                                                                                                                                                                                                                                                                                                                                                        • Internal class used to make sure we always have the latest internal functions working in case we have a version conflict.

                                                                                                                                                                                                                                                                                                                                                                                        method addBreadcrumb

                                                                                                                                                                                                                                                                                                                                                                                        addBreadcrumb: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • Records a new breadcrumb which will be attached to future events.

                                                                                                                                                                                                                                                                                                                                                                                          Breadcrumbs will be added to subsequent events to provide more context on user's actions prior to an error or crash.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter breadcrumb

                                                                                                                                                                                                                                                                                                                                                                                          The breadcrumb to record.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter hint

                                                                                                                                                                                                                                                                                                                                                                                          May contain additional information about the original breadcrumb.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.addBreadcrumb() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method bindClient

                                                                                                                                                                                                                                                                                                                                                                                        bindClient: (client?: Client) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • This binds the given client to the current scope.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter client

                                                                                                                                                                                                                                                                                                                                                                                          An SDK client (client) instance.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use initAndBind() directly.

                                                                                                                                                                                                                                                                                                                                                                                        method captureEvent

                                                                                                                                                                                                                                                                                                                                                                                        captureEvent: (event: Event, hint?: EventHint) => string;
                                                                                                                                                                                                                                                                                                                                                                                        • Captures a manually created event and sends it to Sentry.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter event

                                                                                                                                                                                                                                                                                                                                                                                          The event to send to Sentry.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter hint

                                                                                                                                                                                                                                                                                                                                                                                          May contain additional information about the original exception.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.captureEvent() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method captureException

                                                                                                                                                                                                                                                                                                                                                                                        captureException: (exception: any, hint?: EventHint) => string;
                                                                                                                                                                                                                                                                                                                                                                                        • Captures an exception event and sends it to Sentry.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter exception

                                                                                                                                                                                                                                                                                                                                                                                          An exception-like object.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter hint

                                                                                                                                                                                                                                                                                                                                                                                          May contain additional information about the original exception.

                                                                                                                                                                                                                                                                                                                                                                                          Returns

                                                                                                                                                                                                                                                                                                                                                                                          The generated eventId.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.captureException() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method captureMessage

                                                                                                                                                                                                                                                                                                                                                                                        captureMessage: (
                                                                                                                                                                                                                                                                                                                                                                                        message: string,
                                                                                                                                                                                                                                                                                                                                                                                        level?: Severity | SeverityLevel,
                                                                                                                                                                                                                                                                                                                                                                                        hint?: EventHint
                                                                                                                                                                                                                                                                                                                                                                                        ) => string;
                                                                                                                                                                                                                                                                                                                                                                                        • Captures a message event and sends it to Sentry.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter message

                                                                                                                                                                                                                                                                                                                                                                                          The message to send to Sentry.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter level

                                                                                                                                                                                                                                                                                                                                                                                          Define the level of the message.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter hint

                                                                                                                                                                                                                                                                                                                                                                                          May contain additional information about the original exception.

                                                                                                                                                                                                                                                                                                                                                                                          Returns

                                                                                                                                                                                                                                                                                                                                                                                          The generated eventId.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.captureMessage() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method captureSession

                                                                                                                                                                                                                                                                                                                                                                                        captureSession: (endSession?: boolean) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • Sends the current session on the scope to Sentry

                                                                                                                                                                                                                                                                                                                                                                                          Parameter endSession

                                                                                                                                                                                                                                                                                                                                                                                          If set the session will be marked as exited and removed from the scope

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use top-level captureSession instead.

                                                                                                                                                                                                                                                                                                                                                                                        method configureScope

                                                                                                                                                                                                                                                                                                                                                                                        configureScope: (callback: (scope: Scope) => void) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • Callback to set context information onto the scope.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter callback

                                                                                                                                                                                                                                                                                                                                                                                          Callback function that receives Scope.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use getScope() directly.

                                                                                                                                                                                                                                                                                                                                                                                        method endSession

                                                                                                                                                                                                                                                                                                                                                                                        endSession: () => void;
                                                                                                                                                                                                                                                                                                                                                                                        • Ends the session that lives on the current scope and sends it to Sentry

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use top-level endSession instead.

                                                                                                                                                                                                                                                                                                                                                                                        method getClient

                                                                                                                                                                                                                                                                                                                                                                                        getClient: () => Client | undefined;
                                                                                                                                                                                                                                                                                                                                                                                        • Returns the client of the top stack.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.getClient() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method getIntegration

                                                                                                                                                                                                                                                                                                                                                                                        getIntegration: <T extends Integration>(
                                                                                                                                                                                                                                                                                                                                                                                        integration: IntegrationClass<T>
                                                                                                                                                                                                                                                                                                                                                                                        ) => T | null;
                                                                                                                                                                                                                                                                                                                                                                                        • Returns the integration if installed on the current client.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.getClient().getIntegration() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method getIsolationScope

                                                                                                                                                                                                                                                                                                                                                                                        getIsolationScope: () => Scope;
                                                                                                                                                                                                                                                                                                                                                                                        • Get the currently active isolation scope. The isolation scope is used to isolate data between different hubs.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.getIsolationScope() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method getScope

                                                                                                                                                                                                                                                                                                                                                                                        getScope: () => Scope;
                                                                                                                                                                                                                                                                                                                                                                                        • Returns the scope of the top stack.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.getCurrentScope() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method isOlderThan

                                                                                                                                                                                                                                                                                                                                                                                        isOlderThan: (version: number) => boolean;
                                                                                                                                                                                                                                                                                                                                                                                        • Checks if this hub's version is older than the given version.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter version

                                                                                                                                                                                                                                                                                                                                                                                          A version number to compare to. True if the given version is newer; otherwise false.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          This will be removed in v8.

                                                                                                                                                                                                                                                                                                                                                                                        method lastEventId

                                                                                                                                                                                                                                                                                                                                                                                        lastEventId: () => string | undefined;
                                                                                                                                                                                                                                                                                                                                                                                        • This is the getter for lastEventId.

                                                                                                                                                                                                                                                                                                                                                                                          Returns

                                                                                                                                                                                                                                                                                                                                                                                          The last event id of a captured event.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          This will be removed in v8.

                                                                                                                                                                                                                                                                                                                                                                                        method popScope

                                                                                                                                                                                                                                                                                                                                                                                        popScope: () => boolean;
                                                                                                                                                                                                                                                                                                                                                                                        • Removes a previously pushed scope from the stack.

                                                                                                                                                                                                                                                                                                                                                                                          This restores the state before the scope was pushed. All breadcrumbs and context information added since the last call to this.pushScope are discarded.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use withScope instead.

                                                                                                                                                                                                                                                                                                                                                                                        method pushScope

                                                                                                                                                                                                                                                                                                                                                                                        pushScope: () => Scope;
                                                                                                                                                                                                                                                                                                                                                                                        • Create a new scope to store context information.

                                                                                                                                                                                                                                                                                                                                                                                          The scope will be layered on top of the current one. It is isolated, i.e. all breadcrumbs and context information added to this scope will be removed once the scope ends. Be sure to always remove this scope with this.popScope when the operation finishes or throws.

                                                                                                                                                                                                                                                                                                                                                                                          Returns

                                                                                                                                                                                                                                                                                                                                                                                          Scope, the new cloned scope

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use withScope instead.

                                                                                                                                                                                                                                                                                                                                                                                        method run

                                                                                                                                                                                                                                                                                                                                                                                        run: (callback: (hub: Hub) => void) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • For the duration of the callback, this hub will be set as the global current Hub. This function is useful if you want to run your own client and hook into an already initialized one e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration.

                                                                                                                                                                                                                                                                                                                                                                                          TODO v8: This will be merged with withScope()

                                                                                                                                                                                                                                                                                                                                                                                        method setContext

                                                                                                                                                                                                                                                                                                                                                                                        setContext: (name: string, context: { [key: string]: any }) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • Sets context data with the given name.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter name

                                                                                                                                                                                                                                                                                                                                                                                          of the context

                                                                                                                                                                                                                                                                                                                                                                                          Parameter context

                                                                                                                                                                                                                                                                                                                                                                                          Any kind of data. This data will be normalized.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.setContext() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method setExtra

                                                                                                                                                                                                                                                                                                                                                                                        setExtra: (key: string, extra: Extra) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • Set key:value that will be sent as extra data with the event.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter key

                                                                                                                                                                                                                                                                                                                                                                                          String of extra

                                                                                                                                                                                                                                                                                                                                                                                          Parameter extra

                                                                                                                                                                                                                                                                                                                                                                                          Any kind of data. This data will be normalized.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.setExtra() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method setExtras

                                                                                                                                                                                                                                                                                                                                                                                        setExtras: (extras: Extras) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • Set an object that will be merged sent as extra data with the event.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter extras

                                                                                                                                                                                                                                                                                                                                                                                          Extras object to merge into current context.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.setExtras() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method setTag

                                                                                                                                                                                                                                                                                                                                                                                        setTag: (key: string, value: Primitive) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • Set key:value that will be sent as tags data with the event.

                                                                                                                                                                                                                                                                                                                                                                                          Can also be used to unset a tag, by passing undefined.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter key

                                                                                                                                                                                                                                                                                                                                                                                          String key of tag

                                                                                                                                                                                                                                                                                                                                                                                          Parameter value

                                                                                                                                                                                                                                                                                                                                                                                          Value of tag

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.setTag() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method setTags

                                                                                                                                                                                                                                                                                                                                                                                        setTags: (tags: { [key: string]: Primitive }) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • Set an object that will be merged sent as tags data with the event.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter tags

                                                                                                                                                                                                                                                                                                                                                                                          Tags context object to merge into current context.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.setTags() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method setUser

                                                                                                                                                                                                                                                                                                                                                                                        setUser: (user: User | null) => void;
                                                                                                                                                                                                                                                                                                                                                                                        • Updates user context information for future events.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter user

                                                                                                                                                                                                                                                                                                                                                                                          User context object to be set in the current context. Pass null to unset the user.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.setUser() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method shouldSendDefaultPii

                                                                                                                                                                                                                                                                                                                                                                                        shouldSendDefaultPii: () => boolean;
                                                                                                                                                                                                                                                                                                                                                                                        • Returns if default PII should be sent to Sentry and propagated in outgoing requests when Tracing is used.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use top-level getClient().getOptions().sendDefaultPii instead. This function only unnecessarily increased API surface but only wrapped accessing the option.

                                                                                                                                                                                                                                                                                                                                                                                        method startSession

                                                                                                                                                                                                                                                                                                                                                                                        startSession: (context?: Session) => Session;
                                                                                                                                                                                                                                                                                                                                                                                        • Starts a new Session, sets on the current scope and returns it.

                                                                                                                                                                                                                                                                                                                                                                                          To finish a session, it has to be passed directly to client.captureSession, which is done automatically when using hub.endSession() for the session currently stored on the scope.

                                                                                                                                                                                                                                                                                                                                                                                          When there's already an existing session on the scope, it'll be automatically ended.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter context

                                                                                                                                                                                                                                                                                                                                                                                          Optional properties of the new Session.

                                                                                                                                                                                                                                                                                                                                                                                          Returns

                                                                                                                                                                                                                                                                                                                                                                                          The session which was just started

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use top-level startSession instead.

                                                                                                                                                                                                                                                                                                                                                                                        method startTransaction

                                                                                                                                                                                                                                                                                                                                                                                        startTransaction: (
                                                                                                                                                                                                                                                                                                                                                                                        context: TransactionContext,
                                                                                                                                                                                                                                                                                                                                                                                        customSamplingContext?: CustomSamplingContext
                                                                                                                                                                                                                                                                                                                                                                                        ) => Transaction;
                                                                                                                                                                                                                                                                                                                                                                                        • Starts a new Transaction and returns it. This is the entry point to manual tracing instrumentation.

                                                                                                                                                                                                                                                                                                                                                                                          A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a new child span within the transaction or any span, call the respective .startChild() method.

                                                                                                                                                                                                                                                                                                                                                                                          Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.

                                                                                                                                                                                                                                                                                                                                                                                          The transaction must be finished with a call to its .end() method, at which point the transaction with all its finished child spans will be sent to Sentry.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter context

                                                                                                                                                                                                                                                                                                                                                                                          Properties of the new Transaction.

                                                                                                                                                                                                                                                                                                                                                                                          Parameter customSamplingContext

                                                                                                                                                                                                                                                                                                                                                                                          Information given to the transaction sampling function (along with context-dependent default values). See Options.tracesSampler.

                                                                                                                                                                                                                                                                                                                                                                                          Returns

                                                                                                                                                                                                                                                                                                                                                                                          The transaction which was just started

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use startSpan(), startSpanManual() or startInactiveSpan() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method traceHeaders

                                                                                                                                                                                                                                                                                                                                                                                        traceHeaders: () => { [key: string]: string };
                                                                                                                                                                                                                                                                                                                                                                                        • Returns all trace headers that are currently on the top scope.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use spanToTraceHeader() instead.

                                                                                                                                                                                                                                                                                                                                                                                        method withScope

                                                                                                                                                                                                                                                                                                                                                                                        withScope: <T>(callback: (scope: Scope) => T) => T;
                                                                                                                                                                                                                                                                                                                                                                                        • Creates a new scope with and executes the given operation within. The scope is automatically removed once the operation finishes or throws.

                                                                                                                                                                                                                                                                                                                                                                                          This is essentially a convenience function for:

                                                                                                                                                                                                                                                                                                                                                                                          pushScope(); callback(); popScope();

                                                                                                                                                                                                                                                                                                                                                                                          Parameter callback

                                                                                                                                                                                                                                                                                                                                                                                          that will be enclosed into push/popScope.

                                                                                                                                                                                                                                                                                                                                                                                          Deprecated

                                                                                                                                                                                                                                                                                                                                                                                          Use Sentry.withScope() instead.

                                                                                                                                                                                                                                                                                                                                                                                        interface InProgressCheckIn

                                                                                                                                                                                                                                                                                                                                                                                        interface InProgressCheckIn {}

                                                                                                                                                                                                                                                                                                                                                                                          property monitorSlug

                                                                                                                                                                                                                                                                                                                                                                                          monitorSlug: SerializedCheckIn['monitor_slug'];

                                                                                                                                                                                                                                                                                                                                                                                            property status

                                                                                                                                                                                                                                                                                                                                                                                            status: 'in_progress';

                                                                                                                                                                                                                                                                                                                                                                                              interface Integration

                                                                                                                                                                                                                                                                                                                                                                                              interface Integration {}
                                                                                                                                                                                                                                                                                                                                                                                              • Integration interface

                                                                                                                                                                                                                                                                                                                                                                                              property name

                                                                                                                                                                                                                                                                                                                                                                                              name: string;
                                                                                                                                                                                                                                                                                                                                                                                              • The name of the integration.

                                                                                                                                                                                                                                                                                                                                                                                              method afterAllSetup

                                                                                                                                                                                                                                                                                                                                                                                              afterAllSetup: (client: Client) => void;
                                                                                                                                                                                                                                                                                                                                                                                              • This hook is triggered after setupOnce() and setup() have been called for all integrations. You can use it if it is important that all other integrations have been run before.

                                                                                                                                                                                                                                                                                                                                                                                              method preprocessEvent

                                                                                                                                                                                                                                                                                                                                                                                              preprocessEvent: (
                                                                                                                                                                                                                                                                                                                                                                                              event: Event,
                                                                                                                                                                                                                                                                                                                                                                                              hint: EventHint | undefined,
                                                                                                                                                                                                                                                                                                                                                                                              client: Client
                                                                                                                                                                                                                                                                                                                                                                                              ) => void;
                                                                                                                                                                                                                                                                                                                                                                                              • An optional hook that allows to preprocess an event _before_ it is passed to all other event processors.

                                                                                                                                                                                                                                                                                                                                                                                              method processEvent

                                                                                                                                                                                                                                                                                                                                                                                              processEvent: (
                                                                                                                                                                                                                                                                                                                                                                                              event: Event,
                                                                                                                                                                                                                                                                                                                                                                                              hint: EventHint,
                                                                                                                                                                                                                                                                                                                                                                                              client: Client
                                                                                                                                                                                                                                                                                                                                                                                              ) => Event | null | PromiseLike<Event | null>;
                                                                                                                                                                                                                                                                                                                                                                                              • An optional hook that allows to process an event. Return null to drop the event, or mutate the event & return it. This receives the client that the integration was installed for as third argument.

                                                                                                                                                                                                                                                                                                                                                                                              method setup

                                                                                                                                                                                                                                                                                                                                                                                              setup: (client: Client) => void;
                                                                                                                                                                                                                                                                                                                                                                                              • Set up an integration for the given client. Receives the client as argument.

                                                                                                                                                                                                                                                                                                                                                                                                Whenever possible, prefer this over setupOnce, as that is only run for the first client, whereas setup runs for each client. Only truly global things (e.g. registering global handlers) should be done in setupOnce.

                                                                                                                                                                                                                                                                                                                                                                                              method setupOnce

                                                                                                                                                                                                                                                                                                                                                                                              setupOnce: (
                                                                                                                                                                                                                                                                                                                                                                                              addGlobalEventProcessor: (callback: EventProcessor) => void,
                                                                                                                                                                                                                                                                                                                                                                                              getCurrentHub: () => Hub
                                                                                                                                                                                                                                                                                                                                                                                              ) => void;
                                                                                                                                                                                                                                                                                                                                                                                              • This hook is only called once, even if multiple clients are created. It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.

                                                                                                                                                                                                                                                                                                                                                                                                NOTE: In v8, this will become optional, and not receive any arguments anymore.

                                                                                                                                                                                                                                                                                                                                                                                              interface IntegrationClass

                                                                                                                                                                                                                                                                                                                                                                                              interface IntegrationClass<T> {}
                                                                                                                                                                                                                                                                                                                                                                                              • Integration Class Interface

                                                                                                                                                                                                                                                                                                                                                                                              property id

                                                                                                                                                                                                                                                                                                                                                                                              id: string;
                                                                                                                                                                                                                                                                                                                                                                                              • Property that holds the integration name

                                                                                                                                                                                                                                                                                                                                                                                              construct signature

                                                                                                                                                                                                                                                                                                                                                                                              new (...args: any[]): T;

                                                                                                                                                                                                                                                                                                                                                                                                interface IntegrationFnResult

                                                                                                                                                                                                                                                                                                                                                                                                interface IntegrationFnResult {}
                                                                                                                                                                                                                                                                                                                                                                                                • Integration interface. This is more or less the same as Integration, but with a slimmer setupOnce siganture.

                                                                                                                                                                                                                                                                                                                                                                                                property name

                                                                                                                                                                                                                                                                                                                                                                                                name: string;
                                                                                                                                                                                                                                                                                                                                                                                                • The name of the integration.

                                                                                                                                                                                                                                                                                                                                                                                                method afterAllSetup

                                                                                                                                                                                                                                                                                                                                                                                                afterAllSetup: (client: Client) => void;
                                                                                                                                                                                                                                                                                                                                                                                                • This hook is triggered after setupOnce() and setup() have been called for all integrations. You can use it if it is important that all other integrations have been run before.

                                                                                                                                                                                                                                                                                                                                                                                                method preprocessEvent

                                                                                                                                                                                                                                                                                                                                                                                                preprocessEvent: (
                                                                                                                                                                                                                                                                                                                                                                                                event: Event,
                                                                                                                                                                                                                                                                                                                                                                                                hint: EventHint | undefined,
                                                                                                                                                                                                                                                                                                                                                                                                client: Client
                                                                                                                                                                                                                                                                                                                                                                                                ) => void;
                                                                                                                                                                                                                                                                                                                                                                                                • An optional hook that allows to preprocess an event _before_ it is passed to all other event processors.

                                                                                                                                                                                                                                                                                                                                                                                                method processEvent

                                                                                                                                                                                                                                                                                                                                                                                                processEvent: (
                                                                                                                                                                                                                                                                                                                                                                                                event: Event,
                                                                                                                                                                                                                                                                                                                                                                                                hint: EventHint,
                                                                                                                                                                                                                                                                                                                                                                                                client: Client
                                                                                                                                                                                                                                                                                                                                                                                                ) => Event | null | PromiseLike<Event | null>;
                                                                                                                                                                                                                                                                                                                                                                                                • An optional hook that allows to process an event. Return null to drop the event, or mutate the event & return it. This receives the client that the integration was installed for as third argument.

                                                                                                                                                                                                                                                                                                                                                                                                method setup

                                                                                                                                                                                                                                                                                                                                                                                                setup: (client: Client) => void;
                                                                                                                                                                                                                                                                                                                                                                                                • Set up an integration for the given client. Receives the client as argument.

                                                                                                                                                                                                                                                                                                                                                                                                  Whenever possible, prefer this over setupOnce, as that is only run for the first client, whereas setup runs for each client. Only truly global things (e.g. registering global handlers) should be done in setupOnce.

                                                                                                                                                                                                                                                                                                                                                                                                method setupOnce

                                                                                                                                                                                                                                                                                                                                                                                                setupOnce: () => void;
                                                                                                                                                                                                                                                                                                                                                                                                • This hook is only called once, even if multiple clients are created. It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.

                                                                                                                                                                                                                                                                                                                                                                                                  NOTE: In v8, this will become optional.

                                                                                                                                                                                                                                                                                                                                                                                                interface InternalBaseTransportOptions

                                                                                                                                                                                                                                                                                                                                                                                                interface InternalBaseTransportOptions {}

                                                                                                                                                                                                                                                                                                                                                                                                  property bufferSize

                                                                                                                                                                                                                                                                                                                                                                                                  bufferSize?: number;

                                                                                                                                                                                                                                                                                                                                                                                                    property recordDroppedEvent

                                                                                                                                                                                                                                                                                                                                                                                                    recordDroppedEvent: Client['recordDroppedEvent'];

                                                                                                                                                                                                                                                                                                                                                                                                      property textEncoder

                                                                                                                                                                                                                                                                                                                                                                                                      textEncoder?: TextEncoderInternal;

                                                                                                                                                                                                                                                                                                                                                                                                        interface Mechanism

                                                                                                                                                                                                                                                                                                                                                                                                        interface Mechanism {}
                                                                                                                                                                                                                                                                                                                                                                                                        • Metadata about a captured exception, intended to provide a hint as to the means by which it was captured.

                                                                                                                                                                                                                                                                                                                                                                                                        property data

                                                                                                                                                                                                                                                                                                                                                                                                        data?: {
                                                                                                                                                                                                                                                                                                                                                                                                        [key: string]: string | boolean;
                                                                                                                                                                                                                                                                                                                                                                                                        };
                                                                                                                                                                                                                                                                                                                                                                                                        • Arbitrary data to be associated with the mechanism (for example, errors coming from event handlers include the handler name and the event target. Will show up in the UI directly above the stacktrace.

                                                                                                                                                                                                                                                                                                                                                                                                        property exception_id

                                                                                                                                                                                                                                                                                                                                                                                                        exception_id?: number;
                                                                                                                                                                                                                                                                                                                                                                                                        • An identifier for the exception inside the event.exception.values array. This identifier is referenced to via the parent_id attribute to link and aggregate errors.

                                                                                                                                                                                                                                                                                                                                                                                                        property handled

                                                                                                                                                                                                                                                                                                                                                                                                        handled?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                        • In theory, whether or not the exception has been handled by the user. In practice, whether or not we see it before it hits the global error/rejection handlers, whether through explicit handling by the user or auto instrumentation. Converted to a tag on ingest and used in various ways in the UI.

                                                                                                                                                                                                                                                                                                                                                                                                        property is_exception_group

                                                                                                                                                                                                                                                                                                                                                                                                        is_exception_group?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                        • Indicates whether the exception is an AggregateException.

                                                                                                                                                                                                                                                                                                                                                                                                        property parent_id

                                                                                                                                                                                                                                                                                                                                                                                                        parent_id?: number;
                                                                                                                                                                                                                                                                                                                                                                                                        • References another exception via the exception_id field to indicate that this excpetion is a child of that exception in the case of aggregate or linked errors.

                                                                                                                                                                                                                                                                                                                                                                                                        property source

                                                                                                                                                                                                                                                                                                                                                                                                        source?: string;
                                                                                                                                                                                                                                                                                                                                                                                                        • Describes the source of the exception, in the case that this is a derived (linked or aggregate) error.

                                                                                                                                                                                                                                                                                                                                                                                                          This should be populated with the name of the property where the exception was found on the parent exception. E.g. "cause", "errors[0]", "errors[1]"

                                                                                                                                                                                                                                                                                                                                                                                                        property synthetic

                                                                                                                                                                                                                                                                                                                                                                                                        synthetic?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                        • True when captureException is called with anything other than an instance of Error (or, in the case of browser, an instance of ErrorEvent, DOMError, or DOMException). causing us to create a synthetic error in an attempt to recreate the stacktrace.

                                                                                                                                                                                                                                                                                                                                                                                                        property type

                                                                                                                                                                                                                                                                                                                                                                                                        type: string;
                                                                                                                                                                                                                                                                                                                                                                                                        • For now, restricted to onerror, onunhandledrejection (both obvious), instrument (the result of auto-instrumentation), and generic (everything else). Converted to a tag on ingest.

                                                                                                                                                                                                                                                                                                                                                                                                        interface MetricBucketItem

                                                                                                                                                                                                                                                                                                                                                                                                        interface MetricBucketItem {}

                                                                                                                                                                                                                                                                                                                                                                                                          property metric

                                                                                                                                                                                                                                                                                                                                                                                                          metric: MetricInstance;

                                                                                                                                                                                                                                                                                                                                                                                                            property metricType

                                                                                                                                                                                                                                                                                                                                                                                                            metricType: 'c' | 'g' | 's' | 'd';

                                                                                                                                                                                                                                                                                                                                                                                                              property name

                                                                                                                                                                                                                                                                                                                                                                                                              name: string;

                                                                                                                                                                                                                                                                                                                                                                                                                property tags

                                                                                                                                                                                                                                                                                                                                                                                                                tags: Record<string, string>;

                                                                                                                                                                                                                                                                                                                                                                                                                  property timestamp

                                                                                                                                                                                                                                                                                                                                                                                                                  timestamp: number;

                                                                                                                                                                                                                                                                                                                                                                                                                    property unit

                                                                                                                                                                                                                                                                                                                                                                                                                    unit: MeasurementUnit;

                                                                                                                                                                                                                                                                                                                                                                                                                      interface MetricInstance

                                                                                                                                                                                                                                                                                                                                                                                                                      interface MetricInstance {}
                                                                                                                                                                                                                                                                                                                                                                                                                      • An abstract definition of the minimum required API for a metric instance.

                                                                                                                                                                                                                                                                                                                                                                                                                      property weight

                                                                                                                                                                                                                                                                                                                                                                                                                      weight: number;
                                                                                                                                                                                                                                                                                                                                                                                                                      • Returns the weight of the metric.

                                                                                                                                                                                                                                                                                                                                                                                                                      method add

                                                                                                                                                                                                                                                                                                                                                                                                                      add: (value: number | string) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                      • Adds a value to a metric.

                                                                                                                                                                                                                                                                                                                                                                                                                      method toString

                                                                                                                                                                                                                                                                                                                                                                                                                      toString: () => string;
                                                                                                                                                                                                                                                                                                                                                                                                                      • Serializes the metric into a statsd format string.

                                                                                                                                                                                                                                                                                                                                                                                                                      interface MetricsAggregator

                                                                                                                                                                                                                                                                                                                                                                                                                      interface MetricsAggregator {}
                                                                                                                                                                                                                                                                                                                                                                                                                      • A metrics aggregator that aggregates metrics in memory and flushes them periodically.

                                                                                                                                                                                                                                                                                                                                                                                                                      method add

                                                                                                                                                                                                                                                                                                                                                                                                                      add: (
                                                                                                                                                                                                                                                                                                                                                                                                                      metricType: 'c' | 'g' | 's' | 'd',
                                                                                                                                                                                                                                                                                                                                                                                                                      name: string,
                                                                                                                                                                                                                                                                                                                                                                                                                      value: number | string,
                                                                                                                                                                                                                                                                                                                                                                                                                      unit?: MeasurementUnit,
                                                                                                                                                                                                                                                                                                                                                                                                                      tags?: Record<string, Primitive>,
                                                                                                                                                                                                                                                                                                                                                                                                                      timestamp?: number
                                                                                                                                                                                                                                                                                                                                                                                                                      ) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                      • Add a metric to the aggregator.

                                                                                                                                                                                                                                                                                                                                                                                                                      method close

                                                                                                                                                                                                                                                                                                                                                                                                                      close: () => void;
                                                                                                                                                                                                                                                                                                                                                                                                                      • Shuts down metrics aggregator and clears all metrics.

                                                                                                                                                                                                                                                                                                                                                                                                                      method flush

                                                                                                                                                                                                                                                                                                                                                                                                                      flush: () => void;
                                                                                                                                                                                                                                                                                                                                                                                                                      • Flushes the current metrics to the transport via the transport.

                                                                                                                                                                                                                                                                                                                                                                                                                      method toString

                                                                                                                                                                                                                                                                                                                                                                                                                      toString: () => string;
                                                                                                                                                                                                                                                                                                                                                                                                                      • Returns a string representation of the aggregator.

                                                                                                                                                                                                                                                                                                                                                                                                                      interface MonitorConfig

                                                                                                                                                                                                                                                                                                                                                                                                                      interface MonitorConfig {}

                                                                                                                                                                                                                                                                                                                                                                                                                        property checkinMargin

                                                                                                                                                                                                                                                                                                                                                                                                                        checkinMargin?: SerializedMonitorConfig['checkin_margin'];

                                                                                                                                                                                                                                                                                                                                                                                                                          property failure_issue_threshold

                                                                                                                                                                                                                                                                                                                                                                                                                          failure_issue_threshold?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                            property maxRuntime

                                                                                                                                                                                                                                                                                                                                                                                                                            maxRuntime?: SerializedMonitorConfig['max_runtime'];

                                                                                                                                                                                                                                                                                                                                                                                                                              property recovery_threshold

                                                                                                                                                                                                                                                                                                                                                                                                                              recovery_threshold?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                property schedule

                                                                                                                                                                                                                                                                                                                                                                                                                                schedule: MonitorSchedule;

                                                                                                                                                                                                                                                                                                                                                                                                                                  property timezone

                                                                                                                                                                                                                                                                                                                                                                                                                                  timezone?: SerializedMonitorConfig['timezone'];

                                                                                                                                                                                                                                                                                                                                                                                                                                    interface Options

                                                                                                                                                                                                                                                                                                                                                                                                                                    interface Options<TO extends BaseTransportOptions = BaseTransportOptions>
                                                                                                                                                                                                                                                                                                                                                                                                                                    extends Omit<
                                                                                                                                                                                                                                                                                                                                                                                                                                    Partial<ClientOptions<TO>>,
                                                                                                                                                                                                                                                                                                                                                                                                                                    'integrations' | 'transport' | 'stackParser'
                                                                                                                                                                                                                                                                                                                                                                                                                                    > {}
                                                                                                                                                                                                                                                                                                                                                                                                                                    • Base configuration options for every SDK.

                                                                                                                                                                                                                                                                                                                                                                                                                                    property defaultIntegrations

                                                                                                                                                                                                                                                                                                                                                                                                                                    defaultIntegrations?: false | Integration[];
                                                                                                                                                                                                                                                                                                                                                                                                                                    • If this is set to false, default integrations will not be added, otherwise this will internally be set to the recommended default integrations.

                                                                                                                                                                                                                                                                                                                                                                                                                                    property integrations

                                                                                                                                                                                                                                                                                                                                                                                                                                    integrations?: Integration[] | ((integrations: Integration[]) => Integration[]);
                                                                                                                                                                                                                                                                                                                                                                                                                                    • List of integrations that should be installed after SDK was initialized. Accepts either a list of integrations or a function that receives default integrations and returns a new, updated list.

                                                                                                                                                                                                                                                                                                                                                                                                                                    property stackParser

                                                                                                                                                                                                                                                                                                                                                                                                                                    stackParser?: StackParser | StackLineParser[];
                                                                                                                                                                                                                                                                                                                                                                                                                                    • A stack parser implementation or an array of stack line parsers By default, a stack parser is supplied for all supported browsers

                                                                                                                                                                                                                                                                                                                                                                                                                                    property transport

                                                                                                                                                                                                                                                                                                                                                                                                                                    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 during SDK initialization. By default, the SDK initializes its default transports.

                                                                                                                                                                                                                                                                                                                                                                                                                                    interface OsContext

                                                                                                                                                                                                                                                                                                                                                                                                                                    interface OsContext extends Record<string, unknown> {}

                                                                                                                                                                                                                                                                                                                                                                                                                                      property build

                                                                                                                                                                                                                                                                                                                                                                                                                                      build?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                        property kernel_version

                                                                                                                                                                                                                                                                                                                                                                                                                                        kernel_version?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                          property name

                                                                                                                                                                                                                                                                                                                                                                                                                                          name?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                            property version

                                                                                                                                                                                                                                                                                                                                                                                                                                            version?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                              interface Package

                                                                                                                                                                                                                                                                                                                                                                                                                                              interface Package {}
                                                                                                                                                                                                                                                                                                                                                                                                                                              • JSDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                              property dependencies

                                                                                                                                                                                                                                                                                                                                                                                                                                              dependencies?: Record<string, string>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                property devDependencies

                                                                                                                                                                                                                                                                                                                                                                                                                                                devDependencies?: Record<string, string>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                  property name

                                                                                                                                                                                                                                                                                                                                                                                                                                                  name: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                    property version

                                                                                                                                                                                                                                                                                                                                                                                                                                                    version: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface PolymorphicEvent

                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface PolymorphicEvent {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Event-like interface that's usable in browser and node.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Note: Here we mean the kind of events handled by event listeners, not our Event type.

                                                                                                                                                                                                                                                                                                                                                                                                                                                        Property availability taken from https://developer.mozilla.org/en-US/docs/Web/API/Event#browser_compatibility

                                                                                                                                                                                                                                                                                                                                                                                                                                                      property currentTarget

                                                                                                                                                                                                                                                                                                                                                                                                                                                      readonly currentTarget?: unknown;

                                                                                                                                                                                                                                                                                                                                                                                                                                                        property target

                                                                                                                                                                                                                                                                                                                                                                                                                                                        readonly target?: unknown;

                                                                                                                                                                                                                                                                                                                                                                                                                                                          property type

                                                                                                                                                                                                                                                                                                                                                                                                                                                          readonly type: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                            index signature

                                                                                                                                                                                                                                                                                                                                                                                                                                                            [key: string]: unknown;

                                                                                                                                                                                                                                                                                                                                                                                                                                                              interface Profile

                                                                                                                                                                                                                                                                                                                                                                                                                                                              interface Profile {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                property debug_meta

                                                                                                                                                                                                                                                                                                                                                                                                                                                                debug_meta?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                images: DebugImage[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property device

                                                                                                                                                                                                                                                                                                                                                                                                                                                                  device: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  architecture: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  is_emulator: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  locale: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  manufacturer: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  model: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property environment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                    environment: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property event_id

                                                                                                                                                                                                                                                                                                                                                                                                                                                                      event_id: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property measurements

                                                                                                                                                                                                                                                                                                                                                                                                                                                                        measurements?: Record<
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        unit: MeasurementUnit;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        values: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        elapsed_since_start_ns: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        value: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        >;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property os

                                                                                                                                                                                                                                                                                                                                                                                                                                                                          os: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          version: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          build_number?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property platform

                                                                                                                                                                                                                                                                                                                                                                                                                                                                            platform: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property profile

                                                                                                                                                                                                                                                                                                                                                                                                                                                                              profile: ThreadCpuProfile;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property release

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                release: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property runtime

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  runtime: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  version: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property timestamp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    timestamp: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property transaction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      transaction?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      trace_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      active_thread_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property transactions

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        transactions?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        trace_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        active_thread_id: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        relative_start_ns: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        relative_end_ns: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        }[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property version

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          version: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface PropagationContext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface PropagationContext {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • PropagationContext represents the data from an incoming trace. It should be constructed from incoming trace data, usually represented by sentry-trace and baggage HTTP headers.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              There is always a propagation context present in the SDK (or rather on Scopes), holding at least a traceId. This is to ensure that there is always a trace we can attach events onto, even if performance monitoring is disabled. If there was no incoming traceId, the traceId will be generated by the current SDK.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property dsc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            dsc?: Partial<DynamicSamplingContext>;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • An undefined dsc in the propagation context means that the current SDK invocation is the head of trace and still free to modify and set the DSC for outgoing requests.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The current SDK should not modify this value!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property parentSpanId

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            parentSpanId?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • The parentSpanId denotes the ID of the incoming client span. If there is no parentSpanId on the propagation context, it means that the the incoming trace didn't come from a span.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The current SDK should not modify this value!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property sampled

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            sampled?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Represents the sampling decision of the incoming trace.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The current SDK should not modify this value!

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property spanId

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            spanId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Represents the execution context of the current SDK. This acts as a fallback value to associate events with a particular execution context when performance monitoring is disabled.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              The ID of a current span (if one exists) should have precedence over this value when propagating trace data.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property traceId

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            traceId: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Either represents the incoming traceId or the traceId generated by the current SDK, if there was no incoming trace.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface ReplayEvent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface ReplayEvent extends Event {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • NOTE: These types are still considered Beta and subject to change.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property error_ids

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            error_ids: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property replay_id

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              replay_id: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property replay_start_timestamp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                replay_start_timestamp?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property replay_type

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  replay_type: ReplayRecordingMode;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property segment_id

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    segment_id: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property trace_ids

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      trace_ids: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property urls

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        urls: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface Request

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface Request {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          • Request data included in an event as sent to Sentry

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property cookies

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          cookies?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          [key: string]: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            data?: any;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property env

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              env?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              [key: string]: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property headers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                headers?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                [key: string]: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property method

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  method?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property query_string

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    query_string?: QueryParams;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property url

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      url?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        interface RequestSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        interface RequestSession {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          status?: RequestSessionStatus;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface Runtime

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface Runtime {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Runtime Context.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property name

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            name?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property version

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              version?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface SamplingContext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface SamplingContext extends CustomSamplingContext {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Data passed to the tracesSampler function, which forms the basis for whatever decisions it might make.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Adds default data to data provided by the user. See Hub.startTransaction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property location

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                location?: WorkerLocation;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Object representing the URL of the current page or worker script. Passed by default when using the BrowserTracing integration.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property parentSampled

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                parentSampled?: boolean;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sampling decision from the parent transaction, if any.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property request

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                request?: ExtractedNodeRequestData;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Object representing the incoming request to a node server. Passed by default when using the TracingHandler.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property transactionContext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                transactionContext: TransactionContext;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Context data with which transaction being sampled was created

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface Scope

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface Scope {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Holds additional event information. Scope.applyToEvent will be called by the client before an event is sent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method addAttachment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                addAttachment: (attachment: Attachment) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Adds an attachment to the scope

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter attachment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Attachment options

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method addBreadcrumb

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                addBreadcrumb: (breadcrumb: Breadcrumb, maxBreadcrumbs?: number) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sets the breadcrumbs in the scope

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter breadcrumbs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Breadcrumb

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter maxBreadcrumbs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  number of max breadcrumbs to merged into event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method addEventProcessor

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                addEventProcessor: (callback: EventProcessor) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Add new event processor that will be called after applyToEvent.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method captureEvent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                captureEvent: (event: Event, hint?: EventHint) => string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Capture a Sentry event for this scope.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter exception

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The event to capture.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter hint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Optional additional data to attach to the Sentry event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Returns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  the id of the captured event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method captureException

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                captureException: (exception: unknown, hint?: EventHint) => string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Capture an exception for this scope.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter exception

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The exception to capture.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter hint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Optinal additional data to attach to the Sentry event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Returns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  the id of the captured Sentry event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method captureMessage

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                captureMessage: (
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                message: string,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                level?: SeverityLevel,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                hint?: EventHint
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ) => string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Capture a message for this scope.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter exception

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  The exception to capture.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter level

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  An optional severity level to report the message with.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter hint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Optional additional data to attach to the Sentry event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Returns

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  the id of the captured message.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method clear

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                clear: () => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Clears the current scope and resets its properties.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method clearAttachments

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                clearAttachments: () => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Clears attachments from the scope

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method clearBreadcrumbs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                clearBreadcrumbs: () => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Clears all currently set Breadcrumbs.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method getAttachments

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getAttachments: () => Attachment[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Returns an array of attachments on the scope

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method getClient

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getClient: () => Client | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Get the client assigned to this scope.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  It is generally recommended to use the global function Sentry.getClient() instead, unless you know what you are doing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method getLastBreadcrumb

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getLastBreadcrumb: () => Breadcrumb | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Get the last breadcrumb.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method getPropagationContext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getPropagationContext: () => PropagationContext;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Get propagation context from the scope, used for distributed tracing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method getRequestSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getRequestSession: () => RequestSession | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Returns the RequestSession if there is one

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method getScopeData

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getScopeData: () => ScopeData;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Get the data of this scope, which is applied to an event during processing.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method getSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getSession: () => Session | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Returns the Session if there is one

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method getSpan

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getSpan: () => Span | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Returns the Span if there is one.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Use getActiveSpan() instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method getTransaction

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getTransaction: () => Transaction | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Returns the Transaction attached to the scope (if there is one).

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  You should not rely on the transaction, but just use startSpan() APIs instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method getUser

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                getUser: () => User | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Returns the User if there is one

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setClient

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setClient: (client: Client | undefined) => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Update the client on the scope.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setContext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setContext: (name: string, context: Context | null) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sets context data with the given name.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter name

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  of the context

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter context

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  an object containing context data. This data will be normalized. Pass null to unset the context.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setExtra

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setExtra: (key: string, extra: Extra) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Set key:value that will be sent as extra data with the event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter key

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  String of extra

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter extra

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Any kind of data. This data will be normalized.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setExtras

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setExtras: (extras: Extras) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Set an object that will be merged sent as extra data with the event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter extras

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Extras object to merge into current context.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setFingerprint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setFingerprint: (fingerprint: string[]) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sets the fingerprint on the scope to send with the events.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter fingerprint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  string[] to group events in Sentry.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setLevel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setLevel: (level: Severity | SeverityLevel) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sets the level on the scope for future events.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter level

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  string SeverityLevel

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setPropagationContext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setPropagationContext: (context: PropagationContext) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Add propagation context to the scope, used for distributed tracing

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setRequestSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setRequestSession: (requestSession?: RequestSession) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sets the RequestSession on the scope

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setSDKProcessingMetadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setSDKProcessingMetadata: (newData: { [key: string]: unknown }) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Add data which will be accessible during event processing but won't get sent to Sentry

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setSession: (session?: Session) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sets the Session on the scope

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setSpan

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setSpan: (span?: Span) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sets the Span on the scope.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter span

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Span

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Instead of setting a span on a scope, use startSpan()/startSpanManual() instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setTag

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setTag: (key: string, value: Primitive) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Set key:value that will be sent as tags data with the event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Can also be used to unset a tag by passing undefined.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter key

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  String key of tag

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter value

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Value of tag

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setTags

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setTags: (tags: { [key: string]: Primitive }) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Set an object that will be merged sent as tags data with the event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter tags

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Tags context object to merge into current context.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setTransactionName

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setTransactionName: (name?: string) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Sets the transaction name on the scope for future events.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Use extra or tags instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method setUser

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                setUser: (user: User | null) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Updates user context information for future events.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  User context object to be set in the current context. Pass null to unset the user.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                method update

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                update: (captureContext?: CaptureContext) => this;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Updates the scope with provided data. Can work in three variations: - plain object containing updatable attributes - Scope instance that'll extract the attributes from - callback function that'll receive the current scope as an argument and allow for modifications

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  Parameter captureContext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  scope modifier to be used

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface ScopeContext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface ScopeContext {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • JSDocs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property contexts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                contexts: Contexts;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property extra

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  extra: Extras;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property fingerprint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    fingerprint: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property level

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      level: Severity | SeverityLevel;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property propagationContext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        propagationContext: PropagationContext;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property requestSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          requestSession: RequestSession;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property tags

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            tags: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [key: string]: Primitive;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              user: User;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface ScopeData

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface ScopeData {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property attachments

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  attachments: Attachment[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property breadcrumbs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    breadcrumbs: Breadcrumb[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property contexts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      contexts: Contexts;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property eventProcessors

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        eventProcessors: EventProcessor[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property extra

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          extra: Extras;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property fingerprint

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            fingerprint: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property level

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              level?: SeverityLevel;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property propagationContext

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                propagationContext: PropagationContext;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property sdkProcessingMetadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  sdkProcessingMetadata: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  [key: string]: unknown;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property span

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    span?: Span;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property tags

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      tags: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      [key: string]: Primitive;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property transactionName

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        transactionName?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          This will be removed in v8.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        user: User;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface SdkInfo

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface SdkInfo {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property integrations

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            integrations?: string[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property name

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              name?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property packages

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                packages?: Package[];

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property version

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  version?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    interface SdkMetadata

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    interface SdkMetadata {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property sdk

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      sdk?: SdkInfo;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        interface SentryWrappedXMLHttpRequest

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        interface SentryWrappedXMLHttpRequest {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property getResponseHeader

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          getResponseHeader?: (key: string) => string | null;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property setRequestHeader

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            setRequestHeader?: (key: string, val: string) => void;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              interface SentryXhrData

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              interface SentryXhrData {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property body

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                body?: XHRSendInput;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property method

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  method: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property request_body_size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    request_body_size?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property request_headers

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      request_headers: Record<string, string>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property response_body_size

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        response_body_size?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property status_code

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          status_code?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property url

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            url: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              interface SerializedCheckIn

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              interface SerializedCheckIn {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property check_in_id

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                check_in_id: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property contexts

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  contexts?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  trace?: TraceContext;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property duration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    duration?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property environment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      environment?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property monitor_config

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        monitor_config?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        schedule: MonitorSchedule;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        checkin_margin?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        max_runtime?: number;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        timezone?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property monitor_slug

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          monitor_slug: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property release

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            release?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              status: 'in_progress' | 'ok' | 'error';

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface SerializedEvent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface SerializedEvent extends Omit<Event, 'spans'> {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • Represents the event that's sent in an event envelope, omitting interfaces that are no longer representative after event serialization.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property spans

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                spans?: SpanJSON[];
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                • POJO objects of spans belonging to this event.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface SerializedSession

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                interface SerializedSession {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property abnormal_mechanism

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  abnormal_mechanism?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property attrs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    attrs?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    release?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    environment?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    user_agent?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ip_address?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property did

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      did?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property duration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        duration?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property errors

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          errors: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property init

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            init: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property sid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              sid: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property started

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                started: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  status: SessionStatus;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property timestamp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    timestamp: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface Session

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface Session {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property abnormal_mechanism

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        abnormal_mechanism?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property did

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          did?: string | number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property duration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            duration?: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property environment

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              environment?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property errors

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                errors: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property ignoreDuration

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ignoreDuration: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property init

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    init: boolean;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property ipAddress

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ipAddress?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property release

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        release?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          property sid

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          sid: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property started

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            started: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              property status

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              status: SessionStatus;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                property timestamp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                timestamp: number;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  property user

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  user?: User | null;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    property userAgent

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    userAgent?: string;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      method toJSON

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      toJSON: () => SerializedSession;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • Overrides default JSON serialization of the Session because the Sentry servers expect a slightly different schema of a session which is described in the interface

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        See Also

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        • SerializedSession in this file.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          a Sentry-backend conforming JSON object of the session

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface SessionAggregates

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      interface SessionAggregates {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      • JSDoc

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      property aggregates

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      aggregates: Array<AggregationCounts>;

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        property attrs

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        attrs?: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        environment?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        release?: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        };

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface SessionFlusherLike

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          interface SessionFlusherLike {}

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            method close

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            close: () => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Clears setInterval and calls flush

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            method flush

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            flush: () => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Empties Aggregate Buckets and Sends them to Transport Buffer

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            method incrementSessionStatusCount

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            incrementSessionStatusCount: () => void;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Increments the Session Status bucket in SessionAggregates Object corresponding to the status of the session captured

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface Span

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            interface Span extends Omit<SpanContext, 'op' | 'status' | 'origin'> {}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Span holding trace_id, span_id

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property attributes

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            attributes: SpanAttributes;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Attributes for the span.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use spanToJSON(span).atttributes instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property data

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            data: {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            [key: string]: any;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            };
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Data for the span.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use spanToJSON(span).atttributes instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property endTimestamp

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            endTimestamp?: number | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Timestamp in seconds (epoch time) indicating when the span ended.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use spanToJSON() instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property instrumenter

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            instrumenter: Instrumenter;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • The instrumenter that created this span.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              this field will be removed.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property name

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            name: string;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Human-readable identifier for the span. Identical to span.description.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use spanToJSON(span).description instead.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property op

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            op?: string | undefined;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            • Operation of the Span.

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Deprecated

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Use startSpan() functions to set, `span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'op') to update and spanToJSON().op to read the op instead

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            property origin