import { type Scope } from "https://deno.land/x/sentry_deno@v0.2.2/packages/types/src/index.ts";
Holds additional event information. Scope.applyToEvent will be called by the client before an event is sent.
Methods
addEventProcessor(callback: EventProcessor): this
Add new event processor that will be called after applyToEvent.
setTags(tags: { [key: string]: Primitive; }): this
Set an object that will be merged sent as tags data with the event.
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
.
setExtra(key: string, extra: Extra): this
Set key:value that will be sent as extra data with the event.
getTransaction(): Transaction | undefined
Returns the Transaction
attached to the scope (if there is one)
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
addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this
Sets the breadcrumbs in the scope