Skip to main content
Module

x/sentry/index.d.ts>Hub

The Official Sentry Deno SDK
Go to Latest
class Hub
implements Hub$1
import { Hub } from "https://deno.land/x/sentry@8.0.0-alpha.9/index.d.ts";

Constructors

new
Hub(
client?: Client,
scope?: Scope$1,
isolationScope?: Scope$1,
_version?: number,
)

Creates a new instance of the hub, will push one Layer into the internal stack on creation.

Properties

private
_isolationScope
private
_popScope

Pop a scope from the stack.

private
_pushScope

Push a scope to the stack.

private
_sendSessionUpdate

Sends the current Session on the scope

private
readonly
_stack

Is a Layer[] containing the client and scope

private
readonly
_version

Methods

deprecated
addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void
deprecated
bindClient(client?: Client): void

This binds the given client to the current scope.

deprecated
captureEvent(event: Event, hint?: EventHint): string
deprecated
captureException(exception: unknown, hint?: EventHint): string
deprecated
captureMessage(
message: string,
level?: SeverityLevel,
hint?: EventHint,
): string
deprecated
captureSession(endSession?: boolean): void
deprecated
endSession(): void
deprecated
getClient<C extends Client>(): C | undefined
deprecated
getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null
deprecated
getIsolationScope(): Scope$1
deprecated
getScope(): Scope$1

Returns the scope of the top stack.

deprecated
getStack(): Layer[]

Returns the scope stack for domains or the process.

deprecated
getStackTop(): Layer

Returns the topmost scope layer in the order domain > local > process.

deprecated
setContext(name: string, context: { [key: string]: any; } | null): void
deprecated
setExtra(key: string, extra: Extra): void
deprecated
setExtras(extras: Extras): void
deprecated
setTag(key: string, value: Primitive): void
deprecated
setTags(tags: { [key: string]: Primitive; }): void
deprecated
setUser(user: User | null): void
deprecated
startSession(context?: SessionContext): Session
deprecated
withScope<T>(callback: (scope: Scope$1) => T): T