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: AWSLambda.Breadcrumb[]

Array of breadcrumbs.

_contexts: Contexts

Contexts

_eventProcessors: EventProcessor[]

Callback list that will be called after applyToEvent.

_extra: Extras

Extra

_fingerprint?: string[]

Fingerprint

_level?: AWSLambda.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

_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?: AWSLambda.Span

Span

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

Tags

Type declaration

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

Transaction Name

User

Methods

  • This will be called on every set call.

    Returns void

  • Adds an attachment to the scope

    Parameters

    • attachment: Attachment

      Attachment options

    Returns AWSLambda.Scope

  • Returns an array of attachments on the scope

    Returns Attachment[]

  • Get propagation context from the scope, used for distributed tracing

    Returns PropagationContext

  • Returns the RequestSession if there is one

    Returns undefined | RequestSession

  • Returns the Session if there is one

    Returns undefined | Session

  • 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 AWSLambda.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 AWSLambda.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 AWSLambda.Scope

  • Sets the fingerprint on the scope to send with the events.

    Parameters

    • fingerprint: string[]

      string[] to group events in Sentry.

    Returns AWSLambda.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 AWSLambda.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 AWSLambda.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 AWSLambda.Scope

  • Updates user context information for future events.

    Parameters

    • user: null | AWSLambda.User

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

    Returns AWSLambda.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 AWSLambda.Scope

Generated using TypeDoc