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

Hierarchy

  • Scope

Implements

Properties

_attachments: Attachment[]

Attachments

_breadcrumbs: Breadcrumb[]

Array of breadcrumbs.

_contexts: Contexts

Contexts

_eventProcessors: EventProcessor[]

Callback list that will be called after applyToEvent.

_extra: Extras

Extra

_fingerprint?: string[]

Fingerprint

_level?: Severity | SeverityLevel

Severity

_notifyingListeners: boolean

Flag if notifying is happening.

_propagationContext: PropagationContext

Propagation Context for distributed tracing

_requestSession?: RequestSession

Request Mode Session Status

_scopeListeners: ((scope) => void)[]

Callback for client to receive scope changes.

Type declaration

    • (scope): void
    • Parameters

      Returns void

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

A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get sent to Sentry

Type declaration

  • [key: string]: unknown
_session?: Session

Session

_span?: Span

Span

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

Tags

Type declaration

  • [key: string]: Primitive
_transactionName?: string

Transaction Name

_user: User

User

Methods

  • This will be called after applyToEvent is finished.

    Parameters

    Returns PromiseLike<null | Event>

  • This will be called on every set call.

    Returns void

  • Sets context data with the given name.

    Parameters

    • key: string

      of the context

    • context: null | Context

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

    Returns Scope

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

    Parameters

    • key: string

      String of extra

    • extra: unknown

      Any kind of data. This data will be normalized.

    Returns Scope

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

    Parameters

    • extras: Extras

      Extras object to merge into current context.

    Returns Scope

  • Add data which will be accessible during event processing but won't get sent to Sentry

    Parameters

    • newData: {
          [key: string]: unknown;
      }
      • [key: string]: unknown

    Returns Scope

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

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

    Parameters

    • key: string

      String key of tag

    • value: Primitive

      Value of tag

    Returns Scope

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

    Parameters

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

      Tags context object to merge into current context.

      • [key: string]: Primitive

    Returns Scope

  • Updates user context information for future events.

    Parameters

    • user: null | User

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

    Returns Scope

  • 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

    Parameters

    Returns Scope

Generated using TypeDoc