import { Scope } from "https://deno.land/x/sentry@7.109.0/index.d.ts";
Holds additional event information. Scope.applyToEvent will be called by the client before an event will be sent.
Properties
Methods
addAttachment(attachment: Attachment): this
addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this
addEventProcessor(callback: EventProcessor): this
addScopeListener(callback: (scope: Scope) => void): void
Add internal on change listener. Used for sub SDKs that need to store the scope.
deprecated
applyToEvent(): PromiseLike<Event | null>Applies data from the scope to the event and runs all event processors on it.
captureEvent(event: Event, hint?: EventHint): string
Captures a manually created event for this scope and sends it to Sentry.
captureMessage(): string
message: string,
level?: SeverityLevel,
hint?: EventHint,
Capture a message for this scope.
clear(): this
clearAttachments(): this
clearBreadcrumbs(): this
deprecated
getAttachments(): Attachment[]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.
getLastBreadcrumb(): Breadcrumb | undefined
getPropagationContext(): PropagationContext
getRequestSession(): RequestSession | undefined
getScopeData(): ScopeData
getSession(): Session | undefined
deprecated
getTransaction(): Transaction | undefinedReturns the Transaction
attached to the scope (if there is one).
getUser(): User | undefined
setContext(key: string, context: Context | null): this
setExtra(key: string, extra: Extra): this
setExtras(extras: Extras): this
setFingerprint(fingerprint: string[]): this
setLevel(level: Severity | SeverityLevel): this
setPropagationContext(context: PropagationContext): this
setRequestSession(requestSession?: RequestSession): this
setSDKProcessingMetadata(newData: { [key: string]: unknown; }): this
Add data which will be accessible during event processing but won't get sent to Sentry
setSession(session?: Session): this
setTag(key: string, value: Primitive): this
setTags(tags: { [key: string]: Primitive; }): this
setUser(user: User | null): this
update(captureContext?: CaptureContext): this